fix: allow reserved keywords in package names (backport #486)#491
Merged
lukaszlenart merged 1 commit intoognl-3-4-xfrom Nov 29, 2025
Merged
Conversation
…3-4-x) Port the fix from PR #486 to resolve issue #103 where OGNL parser fails to parse class references containing reserved keywords in package names (e.g., @jp.or.example.Utils@method()). Changes: - Modified ognl.jj grammar to add classNamePart() production that accepts both identifiers and reserved keywords (or, and, not, in, etc.) - Updated instanceof and className() productions to use classNamePart() - Added PackageKeywordTest.java with comprehensive test coverage This allows package names commonly used in Japanese domains (.jp.or.) and other scenarios where reserved keywords appear in package names. Fixes #103
7589f87 to
42a0712
Compare
|
Collaborator
Author
|
@harawata wdyt? |
Contributor
|
Thank you for taking a look at the issue, @lukaszlenart , The added tests look thorough. 👍 Cc: @kazuki43zoo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Port the fix from PR #486 to resolve issue #103 where OGNL parser fails to parse class references containing reserved keywords in package names (e.g.,
@jp.or.example.Utils@method()).Changes:
This allows package names commonly used in Japanese domains (.jp.or.) and other scenarios where reserved keywords appear in package names.
Fixes #103