From 988aae4f2e41ee4d23e827c09095cde1fc07d201 Mon Sep 17 00:00:00 2001 From: Qimiao Chen Date: Wed, 11 Mar 2020 20:51:13 +0800 Subject: [PATCH] Remove unnecessary variable declaration in ProxyCallbackFilter Closes gh-24675 --- .../org/springframework/aop/framework/CglibAopProxy.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 1f5faf3a757..ecaa49855e4 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 {