Hoist Class.getName() from String concatenation to dodge an issue related to profile pollution
This commit is contained in:
parent
7c84695333
commit
484006ce90
|
|
@ -73,8 +73,8 @@ public class SimpleTraceInterceptor extends AbstractTraceInterceptor {
|
|||
* @return the description
|
||||
*/
|
||||
protected String getInvocationDescription(MethodInvocation invocation) {
|
||||
return "method '" + invocation.getMethod().getName() + "' of class [" +
|
||||
invocation.getThis().getClass().getName() + "]";
|
||||
String className = invocation.getThis().getClass().getName();
|
||||
return "method '" + invocation.getMethod().getName() + "' of class [" + className + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -523,7 +523,8 @@ public abstract class BeanUtils {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
String editorName = targetType.getName() + "Editor";
|
||||
String targetTypeName = targetType.getName();
|
||||
String editorName = targetTypeName + "Editor";
|
||||
try {
|
||||
Class<?> editorClass = cl.loadClass(editorName);
|
||||
if (!PropertyEditor.class.isAssignableFrom(editorClass)) {
|
||||
|
|
@ -539,7 +540,7 @@ public abstract class BeanUtils {
|
|||
catch (ClassNotFoundException ex) {
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("No property editor [" + editorName + "] found for type " +
|
||||
targetType.getName() + " according to 'Editor' suffix convention");
|
||||
targetTypeName + " according to 'Editor' suffix convention");
|
||||
}
|
||||
unknownEditorTypes.add(targetType);
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -611,7 +611,9 @@ public abstract class ObjectUtils {
|
|||
if (obj == null) {
|
||||
return EMPTY_STRING;
|
||||
}
|
||||
return obj.getClass().getName() + "@" + getIdentityHexString(obj);
|
||||
String className = obj.getClass().getName();
|
||||
String identityHexString = getIdentityHexString(obj);
|
||||
return className + '@' + identityHexString;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -123,8 +123,8 @@ public class DefaultWebFilterChain implements WebFilterChain {
|
|||
}
|
||||
|
||||
private Mono<Void> invokeFilter(WebFilter current, DefaultWebFilterChain chain, ServerWebExchange exchange) {
|
||||
return current.filter(exchange, chain)
|
||||
.checkpoint(current.getClass().getName() + " [DefaultWebFilterChain]");
|
||||
String currentName = current.getClass().getName();
|
||||
return current.filter(exchange, chain).checkpoint(currentName + " [DefaultWebFilterChain]");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue