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:
Yanming Zhou
2026-04-27 16:07:31 +08:00
committed by Sam Brannen
parent 626907bbfd
commit dc032c1e33
19 changed files with 23 additions and 23 deletions
@@ -315,7 +315,7 @@ class VariableAndFunctionTests extends AbstractExpressionTests {
// Since ArrayHolder is an "instanceof Object" and Object is the varargs component type,
// we expect the ArrayHolder not to be converted to an array but rather to be passed
// "as is" as a single argument to the varargs method.
evaluate("#varargsObjectFunction(#arrayHolder)", "[" + arrayHolder.toString() + "]");
evaluate("#varargsObjectFunction(#arrayHolder)", "[" + arrayHolder + "]");
}
@Test
@@ -328,7 +328,7 @@ class VariableAndFunctionTests extends AbstractExpressionTests {
// Since ArrayHolder is an "instanceof Object" and Object is the varargs component type,
// we expect the ArrayHolder not to be converted to an array but rather to be passed
// "as is" as a single argument to the varargs method.
evaluate("#varargsObjectFunctionHandle(#arrayHolder)", "[" + arrayHolder.toString() + "]");
evaluate("#varargsObjectFunctionHandle(#arrayHolder)", "[" + arrayHolder + "]");
}
private void evaluate(String expression, Object expectedValue) {