@@ -112,7 +112,7 @@ class CglibAopProxy implements AopProxy, Serializable {
112
112
/** Dispatcher used for methods on Advised. */
113
113
private final transient AdvisedDispatcher advisedDispatcher ;
114
114
115
- private transient Map <String , Integer > fixedInterceptorMap = Collections .emptyMap ();
115
+ private transient Map <Method , Integer > fixedInterceptorMap = Collections .emptyMap ();
116
116
117
117
private transient int fixedInterceptorOffset ;
118
118
@@ -327,10 +327,11 @@ private Callback[] getCallbacks(Class<?> rootClass) throws Exception {
327
327
328
328
// TODO: small memory optimization here (can skip creation for methods with no advice)
329
329
for (int x = 0 ; x < methods .length ; x ++) {
330
- List <Object > chain = this .advised .getInterceptorsAndDynamicInterceptionAdvice (methods [x ], rootClass );
330
+ Method method = methods [x ];
331
+ List <Object > chain = this .advised .getInterceptorsAndDynamicInterceptionAdvice (method , rootClass );
331
332
fixedCallbacks [x ] = new FixedChainStaticTargetInterceptor (
332
333
chain , this .advised .getTargetSource ().getTarget (), this .advised .getTargetClass ());
333
- this .fixedInterceptorMap .put (methods [ x ]. toString () , x );
334
+ this .fixedInterceptorMap .put (method , x );
334
335
}
335
336
336
337
// Now copy both the callbacks from mainCallbacks
@@ -762,12 +763,12 @@ private static class ProxyCallbackFilter implements CallbackFilter {
762
763
763
764
private final AdvisedSupport advised ;
764
765
765
- private final Map <String , Integer > fixedInterceptorMap ;
766
+ private final Map <Method , Integer > fixedInterceptorMap ;
766
767
767
768
private final int fixedInterceptorOffset ;
768
769
769
770
public ProxyCallbackFilter (
770
- AdvisedSupport advised , Map <String , Integer > fixedInterceptorMap , int fixedInterceptorOffset ) {
771
+ AdvisedSupport advised , Map <Method , Integer > fixedInterceptorMap , int fixedInterceptorOffset ) {
771
772
772
773
this .advised = advised ;
773
774
this .fixedInterceptorMap = fixedInterceptorMap ;
@@ -852,7 +853,7 @@ public int accept(Method method) {
852
853
}
853
854
return AOP_PROXY ;
854
855
}
855
- String key = method . toString () ;
856
+ Method key = method ;
856
857
// Check to see if we have fixed interceptor to serve this method.
857
858
// Else use the AOP_PROXY.
858
859
if (isStatic && isFrozen && this .fixedInterceptorMap .containsKey (key )) {
0 commit comments