ARTEMIS-568 Catch broken JMS selector expressions
Enforce an EOF on the expression so the selector parser keeps going and catches the broken selector statement.
This commit is contained in:
parent
369f2e0063
commit
5c29cc9a28
|
@ -142,7 +142,7 @@ BooleanExpression JmsSelector() :
|
|||
}
|
||||
{
|
||||
(
|
||||
left = orExpression()
|
||||
left = orExpression() <EOF>
|
||||
)
|
||||
{
|
||||
return asBooleanExpression(left);
|
||||
|
|
|
@ -142,7 +142,7 @@ BooleanExpression JmsSelector() :
|
|||
}
|
||||
{
|
||||
(
|
||||
left = orExpression()
|
||||
left = orExpression() <EOF>
|
||||
)
|
||||
{
|
||||
return asBooleanExpression(left);
|
||||
|
|
|
@ -470,6 +470,8 @@ public class SelectorTest {
|
|||
assertInvalidSelector(message, "3+5");
|
||||
assertInvalidSelector(message, "True AND 3+5");
|
||||
assertInvalidSelector(message, "=TEST 'test'");
|
||||
assertInvalidSelector(message, "prop1 = prop2 foo AND string = 'Test'");
|
||||
assertInvalidSelector(message, "a = 1 AMD b = 2");
|
||||
}
|
||||
|
||||
protected MockMessage createMessage() {
|
||||
|
|
Loading…
Reference in New Issue