Improve documentation for overloaded operators in SpEL
See gh-32182
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user