This is an automated email from the ASF dual-hosted git repository.
henrib pushed a commit to branch JEXL-448
in repository https://gitbox.apache.org/repos/asf/commons-jexl.git
The following commit(s) were added to refs/heads/JEXL-448 by this push:
new 348f6dc1 JEXL: restore previous annotation behavior (block preferred
to set);
348f6dc1 is described below
commit 348f6dc1f45fdc69f1e8b8ce4f93723ab4e5dd6c
Author: Henrib <[email protected]>
AuthorDate: Mon Nov 10 15:10:35 2025 +0100
JEXL: restore previous annotation behavior (block preferred to set);
---
src/main/java/org/apache/commons/jexl3/parser/Parser.jjt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/jexl3/parser/Parser.jjt
b/src/main/java/org/apache/commons/jexl3/parser/Parser.jjt
index 59eee701..76bdc8a0 100644
--- a/src/main/java/org/apache/commons/jexl3/parser/Parser.jjt
+++ b/src/main/java/org/apache/commons/jexl3/parser/Parser.jjt
@@ -413,7 +413,7 @@ void Annotation() #Annotation :
void AnnotatedStatement() #AnnotatedStatement : {}
{
- (LOOKAHEAD(2) Annotation())+ Statement()
+ (LOOKAHEAD(2) Annotation())+ (LOOKAHEAD(1) Block() | Statement())
}
void Statement() #void : {}
@@ -441,7 +441,7 @@ void StatementSink() #void : {}
| LOOKAHEAD(3) SwitchStatement()
| LOOKAHEAD(LambdaLookahead()) Lambda()
| LOOKAHEAD(Expression()) ExpressionStatement()
- | Block()
+ | LOOKAHEAD(3) Block()
| LOOKAHEAD(<VAR>, { !getFeatures().isLexical()} ) Var()
}