File tree Expand file tree Collapse file tree 3 files changed +6
-13
lines changed
spring-aop/src/main/java/org/springframework/aop/interceptor
spring-beans/src/main/java/org/springframework/beans/factory/support
spring-context-support/src/main/java/org/springframework/cache/jcache/interceptor Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -98,16 +98,12 @@ public void setLogTargetClassInvocation(boolean logTargetClassInvocation) {
98
98
* @see #setSuffix
99
99
*/
100
100
protected String createInvocationTraceName (MethodInvocation invocation ) {
101
- StringBuilder sb = new StringBuilder (getPrefix ());
102
101
Method method = invocation .getMethod ();
103
102
Class <?> clazz = method .getDeclaringClass ();
104
103
if (this .logTargetClassInvocation && clazz .isInstance (invocation .getThis ())) {
105
104
clazz = invocation .getThis ().getClass ();
106
105
}
107
- sb .append (clazz .getName ());
108
- sb .append ('.' ).append (method .getName ());
109
- sb .append (getSuffix ());
110
- return sb .toString ();
106
+ return getPrefix () + clazz .getName () + '.' + method .getName () + getSuffix ();
111
107
}
112
108
113
109
}
Original file line number Diff line number Diff line change @@ -89,12 +89,10 @@ public boolean equals(Object other) {
89
89
90
90
@ Override
91
91
public String toString () {
92
- StringBuilder sb = new StringBuilder ("Generic bean" );
93
92
if (this .parentName != null ) {
94
- sb . append ( " with parent '"). append ( this .parentName ). append ( "'" );
93
+ return "Generic bean with parent '" + this .parentName + "': " + super . toString ( );
95
94
}
96
- sb .append (": " ).append (super .toString ());
97
- return sb .toString ();
95
+ return "Generic bean: " + super .toString ();
98
96
}
99
97
100
98
}
Original file line number Diff line number Diff line change @@ -212,10 +212,9 @@ protected String generateDefaultCacheName(Method method) {
212
212
parameters .add (parameterType .getName ());
213
213
}
214
214
215
- StringBuilder sb = new StringBuilder (method .getDeclaringClass ().getName ());
216
- sb .append ("." ).append (method .getName ());
217
- sb .append ("(" ).append (StringUtils .collectionToCommaDelimitedString (parameters )).append (")" );
218
- return sb .toString ();
215
+ return method .getDeclaringClass ().getName ()
216
+ + '.' + method .getName ()
217
+ + '(' + StringUtils .collectionToCommaDelimitedString (parameters ) + ')' ;
219
218
}
220
219
221
220
private int countNonNull (Object ... instances ) {
You can’t perform that action at this time.
0 commit comments