Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: issue 4311 IllegalStateException when removing all comments with LexicalPreservingPrinter #4313

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

jlerbsc
Copy link
Collaborator

@jlerbsc jlerbsc commented Feb 6, 2024

This bug is highlighted by the presence of 2 comments with the same content. To check that a comment matches in the list of tokens, the range must be always checked, as comments with the same content may exist on different lines.

Fixes #4311 .

…e, if the content is identical, you can assume that you have found the token corresponding to the comment.
@jlerbsc jlerbsc merged commit 8307559 into javaparser:master Feb 6, 2024
38 checks passed
@jlerbsc jlerbsc added this to the next release milestone Feb 6, 2024
@jlerbsc jlerbsc added the PR: Fixed A PR that offers a fix or correction label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: Fixed A PR that offers a fix or correction
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IllegalStateException when removing all comments with LexicalPreservingPrinter
1 participant