Use concatenation instead of torn StringBuilder::append chain
This commit is contained in:
committed by
Juergen Hoeller
parent
cd0b517abf
commit
604361ee1f
@@ -98,16 +98,12 @@ public abstract class AbstractMonitoringInterceptor extends AbstractTraceInterce
|
||||
* @see #setSuffix
|
||||
*/
|
||||
protected String createInvocationTraceName(MethodInvocation invocation) {
|
||||
StringBuilder sb = new StringBuilder(getPrefix());
|
||||
Method method = invocation.getMethod();
|
||||
Class<?> clazz = method.getDeclaringClass();
|
||||
if (this.logTargetClassInvocation && clazz.isInstance(invocation.getThis())) {
|
||||
clazz = invocation.getThis().getClass();
|
||||
}
|
||||
sb.append(clazz.getName());
|
||||
sb.append('.').append(method.getName());
|
||||
sb.append(getSuffix());
|
||||
return sb.toString();
|
||||
return getPrefix() + clazz.getName() + '.' + method.getName() + getSuffix();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user