As far as I can tell, we simply don't support the single '|' operator in SpEL. In my local unit tests, I get a proper exception for such a scenario. Do you have a specific SpEL expression that causes it to hang?
Please see the trace below. Test expression is simply "|" or in fact any containing a single "|".
The method seems to fall into never-ending loop after that
at org.springframework.expression.spel.standard.Tokenizer.process(Tokenizer.java:145)
at org.springframework.expression.spel.standard.Tokenizer.<init>(Tokenizer.java:47)
at org.springframework.expression.spel.standard.InternalSpelExpressionParser.doParseExpression(InternalSpelExpressionParser.java:77)
at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:56)
at org.springframework.expression.spel.standard.SpelExpressionParser.doParseExpression(SpelExpressionParser.java:32)
at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpression(TemplateAwareExpressionParser.java:66)
at org.springframework.expression.common.TemplateAwareExpressionParser.parseExpression(TemplateAwareExpressionParser.java:56)
I can't reproduce this against 4.x, so it may be a 3.2.x only issue (which we're unlikely to fix at this point). Could you give it a try against 4.1.6 please?
Igors Ustinovs opened SPR-12952 and commented
Specifying OR operator as a single | instead of || causes the system to hang
Affects: 3.2 GA
The text was updated successfully, but these errors were encountered: