From 70be9afdc6ebd2eb1f2f882437cfa4f7da34f42f Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 12 Jun 2023 11:11:07 +0200 Subject: [PATCH] Reuse method cache from original proxy factory (aligned with 6.0.x) See gh-30616 --- .../java/org/springframework/aop/framework/AdvisedSupport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java index 3de330c108c..f771a8b0013 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -521,6 +521,7 @@ public class AdvisedSupport extends ProxyConfig implements Advised { copy.copyFrom(this); copy.targetSource = EmptyTargetSource.forClass(getTargetClass(), getTargetSource().isStatic()); copy.advisorChainFactory = this.advisorChainFactory; + copy.methodCache = this.methodCache; copy.interfaces = new ArrayList<>(this.interfaces); copy.advisors = new ArrayList<>(this.advisors); return copy;