mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-07 15:39:29 +00:00
Remove unnecessary invocations of toString()
Closes gh-36709
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
(cherry picked from commit bfb88cfc1c)
This commit is contained in:
committed by
Sam Brannen
parent
626907bbfd
commit
dc032c1e33
+1
-1
@@ -145,7 +145,7 @@ implements CallbackGenerator
|
||||
private static void superHelper(CodeEmitter e, MethodInfo method, Context context)
|
||||
{
|
||||
if (TypeUtils.isAbstract(method.getModifiers())) {
|
||||
e.throw_exception(ABSTRACT_METHOD_ERROR, method.toString() + " is abstract" );
|
||||
e.throw_exception(ABSTRACT_METHOD_ERROR, method + " is abstract" );
|
||||
} else {
|
||||
e.load_this();
|
||||
context.emitLoadArgsAndInvoke(e, method);
|
||||
|
||||
+1
-1
@@ -59,7 +59,7 @@ class GeneratedMethodsTests {
|
||||
|
||||
@Test
|
||||
void createWithExistingGeneratorUsesGenerator() {
|
||||
Function<MethodName, String> generator = name -> "__" + name.toString();
|
||||
Function<MethodName, String> generator = name -> "__" + name;
|
||||
GeneratedMethods methods = new GeneratedMethods(TEST_CLASS_NAME, generator);
|
||||
assertThat(methods.add("test", methodSpecCustomizer).getName()).hasToString("__test");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user