Skip to content

Commit d08ce30

Browse files
stsypanovsbrannen
authored andcommitted
Extract Class.getName() from String concatenation
This commit extracts a Class.getName() invocation from String concatenation in AbstractMonitoringInterceptor to avoid an issue related to profile pollution. Closes gh-25324
1 parent 9876ca0 commit d08ce30

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-aop/src/main/java/org/springframework/aop/interceptor/AbstractMonitoringInterceptor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ protected String createInvocationTraceName(MethodInvocation invocation) {
103103
if (this.logTargetClassInvocation && clazz.isInstance(invocation.getThis())) {
104104
clazz = invocation.getThis().getClass();
105105
}
106-
return getPrefix() + clazz.getName() + '.' + method.getName() + getSuffix();
106+
String clazzName = clazz.getName();
107+
return getPrefix() + clazzName + '.' + method.getName() + getSuffix();
107108
}
108109

109110
}

0 commit comments

Comments
 (0)