Skip to content

lombok.Generated fields leading to IndexOutOfBoundsException in ReloadableJava21Parser #5527

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

JohannisK
Copy link
Contributor

@JohannisK JohannisK commented May 30, 2025

What's changed?

If a class contains a Lombok generated field, these fields were tried to parse. Leading to a IndexOutOfBoundsExcpetion because the nodes were not part of the source.

Now these are skiped.

What's your motivation?

The ReloadableJava21Parser throws IndexOutOfBoundsExceptions on certain classes. This test shows it is probably related to Lombok, Jackson, or a combination of the two.

@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite May 30, 2025
@JohannisK JohannisK added bug Something isn't working java 21+ labels May 30, 2025
@timtebeek timtebeek marked this pull request as draft May 30, 2025 14:21
@MBoegers MBoegers marked this pull request as ready for review June 3, 2025 11:08
@MBoegers MBoegers self-assigned this Jun 3, 2025
@MBoegers MBoegers changed the title Bugfix: IndexOutOfBoundsException in ReloadableJava21Parser lombok.Generated dields leading to IndexOutOfBoundsException in ReloadableJava21Parser Jun 3, 2025
@MBoegers MBoegers changed the title lombok.Generated dields leading to IndexOutOfBoundsException in ReloadableJava21Parser lombok.Generated fields leading to IndexOutOfBoundsException in ReloadableJava21Parser Jun 3, 2025
@MBoegers MBoegers requested a review from Laurens-W June 4, 2025 08:34
@MBoegers MBoegers moved this from In Progress to Ready to Review in OpenRewrite Jun 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working java 21+
Projects
Status: Ready to Review
Development

Successfully merging this pull request may close these issues.

2 participants