-
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
Registration for reflection of non-public classes under java.
fails silently
#28431
Comments
We could revert #28219 - but as I mentioned in apache/camel-quarkus#4148 (comment) the issue only highlighted a previous issue, and that issue would still apply if someone were to use
So I'd rather fix gizmo rather than reverting. |
Re-opening as it depends on a new gizmo release and updating the BOM accordingly. |
Replicates quarkusio/quarkus#28431 (cherry picked from commit b06455e)
Fixes: quarkusio/quarkus#28431 (cherry picked from commit 64f0cff)
@gsmet Will the fix for this get backported to 2.13? I see the issue got removed from the 2.13.2 milestone. |
Yes, it will be in 2.13.2.Final. |
Describe the bug
When registering a non-public class under
java.
for reflection the registration fails silently. This is happening because gizmo gets the class directly (not through reflection):However,
Collections.EmptyList
isprivate
, as a result this is not going to work. Note here that we don't see any error due to #26162. The actual exception is:In contrast when registering a class that is not under
java.
the register method usesClass.forName
which works for non-public methods as well and looks like this:Expected behavior
Registration of non-public classes should work.
Actual behavior
Registration of non-public classes fails silently.
How to Reproduce?
Thanks to @jamesnetherton
Output of
uname -a
orver
No response
Output of
java -version
openjdk version "17.0.4" 2022-07-19 OpenJDK Runtime Environment Temurin-17.0.4+8 (build 17.0.4+8) OpenJDK 64-Bit Server VM Temurin-17.0.4+8 (build 17.0.4+8, mixed mode, sharing)
GraalVM version (if different from Java)
22.0
Quarkus version or git rev
2.13.1 and ebb2c7b
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
IMO the issue is in gizmo and should fixed there. In the meantime we might want to revert #28219 at least in 2.13, as that's the change that unveiled the issue.
cc @Sanne
The text was updated successfully, but these errors were encountered: