Improve documentation for overloaded operators in SpEL

See gh-32182
This commit is contained in:
Sam Brannen
2024-02-02 14:39:09 +01:00
parent ae17b11b70
commit 1e432ff95d
3 changed files with 17 additions and 5 deletions

View File

@@ -457,7 +457,7 @@ class SpelDocumentationTests extends AbstractExpressionTests {
context.setOperatorOverloader(new ListConcatenation());
// evaluates to [1, 2, 3, 4, 5]
List list = parser.parseExpression("{1, 2, 3} + {4, 5}").getValue(context, List.class);
List list = parser.parseExpression("{1, 2, 3} + {2 + 2, 5}").getValue(context, List.class);
assertThat(list).containsExactly(1, 2, 3, 4, 5);
}
@@ -706,7 +706,7 @@ class SpelDocumentationTests extends AbstractExpressionTests {
}
throw new UnsupportedOperationException(
"No overload for operation %s and operands [%s] and [%s]"
.formatted(operation.name(), left, right));
.formatted(operation, left, right));
}
}