Skip to content

Commit

Permalink
Extract Class.getName() from String concatenation
Browse files Browse the repository at this point in the history
This commit extracts a Class.getName() invocation from String
concatenation in AbstractMonitoringInterceptor to avoid an issue
related to profile pollution.

Closes spring-projectsgh-25324
  • Loading branch information
stsypanov authored and xcl(徐程林) committed Aug 16, 2020
1 parent 02adc2d commit 39e59de
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -103,7 +103,8 @@ protected String createInvocationTraceName(MethodInvocation invocation) {
if (this.logTargetClassInvocation && clazz.isInstance(invocation.getThis())) {
clazz = invocation.getThis().getClass();
}
return getPrefix() + clazz.getName() + '.' + method.getName() + getSuffix();
String clazzName = clazz.getName();
return getPrefix() + clazzName + '.' + method.getName() + getSuffix();
}

}

0 comments on commit 39e59de

Please sign in to comment.