Skip to content

Commit b92515b

Browse files
authored
Add logger.isInfoEnabled check before logger.info
Closes gh-24667
1 parent 018ba92 commit b92515b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-aop/src/main/java/org/springframework/aop/framework/ProxyFactoryBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ public Object getObject() throws BeansException {
254254
return getSingletonInstance();
255255
}
256256
else {
257-
if (this.targetName == null) {
257+
if (this.targetName == null && logger.isInfoEnabled()) {
258258
logger.info("Using non-singleton proxies with singleton targets is often undesirable. " +
259259
"Enable prototype proxies by setting the 'targetName' property.");
260260
}

0 commit comments

Comments
 (0)