-
Notifications
You must be signed in to change notification settings - Fork 275
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
bug: Handle NoClassDefFoundError when loading YAML recipes with missing recipe dependencies #4186
bug: Handle NoClassDefFoundError when loading YAML recipes with missing recipe dependencies #4186
Conversation
…ng class dependencies
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on! I take it you've tested this particular scenario then as well?
Had another look; when I modify the test case here to use an invalid class, it seems we're not entering the new catch block where I had expected that: rewrite/rewrite-core/src/test/java/org/openrewrite/config/YamlResourceLoaderTest.java Line 303 in 03c4584
Also note that the new catch block is only added for Yaml resources that contain more than one document (or at least a Perhaps we should still add a test if possible to ensure we're catching in the right place and not missing certain cases. |
I've added exception handling for the |
What's changed?
Added logic to catch NoClassDefFoundError errors when loading YAML recipes with missing recipe dependencies
What's your motivation?
NoClassDefFoundError errors were previously not handled compromising troubleshooting.
Anything in particular you'd like reviewers to focus on?
Potential for regressed behaviour.
Anyone you would like to review specifically?
@timtebeek
Have you considered any alternatives or workarounds?
No
Any additional context
No
Checklist