-
Notifications
You must be signed in to change notification settings - Fork 72
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
MigrateCollectionsSingletonList produces IllegalArgumentException #150
Comments
…letonList` The `JavaTemplate` engine can throw an `IllegalStateException` when there are missing type attributions. To guard against this in the presence of Lombok annotations, the recipe `MigrateCollectionsSingletonList` now uses `NoMissingTypes` as an additional single source applicability test. Issue: #150
When I try to reproduce this one I get an
The reason being that due to the Lombok annotation @crehn We have another issue where we track the support for Lombok annotations: openrewrite/rewrite#1297. I suggest you subscribe to that issue for updates on this topic. In the meantime you can as a workaround maybe delombok the affected sources or migrate those manually. @timtebeek So that the recipe no longer reports any exception, it now uses |
Appreciate you putting that guard in place @knutwannheden ; that resolved the immediate error in this case indeed & agree that it's better to have a single issue tracking Lombok support. Hope you agree @crehn and can at least use the recipe for now! Until the next release you might want to have a look at using our snapshot versions. |
Prerequisite:
Have something like this in your code:
Then
produces this error:
Every recipe that uses this recipe indirectly also produces this error.
The text was updated successfully, but these errors were encountered: