Merge branch '6.0.x'

This commit is contained in:
Sam Brannen
2023-06-22 15:12:25 +02:00
14 changed files with 27 additions and 30 deletions

View File

@@ -544,7 +544,7 @@ class EvaluationTests extends AbstractExpressionTests {
pattern += "?";
assertThat(pattern).hasSize(1001);
evaluateAndCheckError("'abc' matches '" + pattern + "'", Boolean.class, SpelMessage.MAX_REGEX_LENGTH_EXCEEDED);
evaluateAndCheckError("'X' matches '" + pattern + "'", Boolean.class, SpelMessage.MAX_REGEX_LENGTH_EXCEEDED);
}
}

View File

@@ -50,7 +50,7 @@ class KotlinSpelReproTests {
val expr = parser.parseExpression("#key.startsWith('hello')")
context.registerFunction("suspendingGet", Config::class.java.getMethod("suspendingGet", String::class.java, Continuation::class.java))
context.setVariable("key", "hello world")
assertThat(expr .getValue(context, Boolean::class.java)).isTrue()
assertThat(expr.getValue(context, Boolean::class.java)).isTrue()
context.setVariable("key", "")
assertThat(expr.getValue(context, Boolean::class.java)).isFalse()
}