-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Avoid classes with incomplete hierarchy in Hibernate Validator #40383
Conversation
ade302c
to
cce7533
Compare
6b04627
to
218e369
Compare
This comment has been minimized.
This comment has been minimized.
...ent/src/main/java/io/quarkus/hibernate/validator/deployment/HibernateValidatorProcessor.java
Outdated
Show resolved
Hide resolved
Thanks for having a look. I spotted an issue but not sure why the tests are failing. |
86bfb12
to
93ecb15
Compare
This comment has been minimized.
This comment has been minimized.
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.
LGTM.
However, I'd like to point out a runtime class may have a complete class hierarchy at build time, yet have an incomplete one at runtime, because a superclass got excluded. Classes relying on XML parsers are a prime example of this, as we try to exclude XML parsers from runtime but still need them at build time.
So, I suspect this won't solve the problem completely. Still, it's a nice improvement, and maybe it'll fix that specific problem with Apache POI (did you check that?), so let's merge.
Well, let's merge once tests pass :] |
Yeap, I checked that and the error is gone, I'll investigate what's causing the other tests to fail |
Apparently generated bytecode isn't visible during this build step. It barfs saying that |
Because of #40383 (comment), I adopted a different strategy by performing the check in the Recorder class. Tests are passing locally for me |
Status for workflow
|
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.
LGTM. As far as I can tell loading these classes would happen anyway without your code, so it should not have much impact on startup time.
Let's merge if this still fixes the problem in POI.
I can confirm this fixes quarkiverse/quarkus-poi#102. Merging |
As explained in quarkiverse/quarkus-poi#102, some classes cannot be loaded because of an incomplete hierarchy