Polishing and removal of "this." for method invocations

This commit is contained in:
Sam Brannen
2025-06-09 14:10:30 +02:00
parent 99890b6147
commit 18d6a55e3e
37 changed files with 127 additions and 135 deletions

View File

@@ -276,7 +276,7 @@ class VariableAndFunctionTests extends AbstractExpressionTests {
@Test
void functionMethodMustBeStatic() throws Exception {
context.registerFunction("nonStatic", this.getClass().getMethod("nonStatic"));
context.registerFunction("nonStatic", getClass().getMethod("nonStatic"));
SpelExpression expression = parser.parseRaw("#nonStatic()");
assertThatExceptionOfType(SpelEvaluationException.class)
.isThrownBy(() -> expression.getValue(context))