diff --git a/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java b/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java index 1f5faf3a75..ecaa49855e 100644 --- a/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java +++ b/spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2020 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. @@ -876,15 +876,14 @@ class CglibAopProxy implements AopProxy, Serializable { } return AOP_PROXY; } - Method key = method; // Check to see if we have fixed interceptor to serve this method. // Else use the AOP_PROXY. - if (isStatic && isFrozen && this.fixedInterceptorMap.containsKey(key)) { + if (isStatic && isFrozen && this.fixedInterceptorMap.containsKey(method)) { if (logger.isTraceEnabled()) { logger.trace("Method has advice and optimizations are enabled: " + method); } // We know that we are optimizing so we can use the FixedStaticChainInterceptors. - int index = this.fixedInterceptorMap.get(key); + int index = this.fixedInterceptorMap.get(method); return (index + this.fixedInterceptorOffset); } else {