-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[GR-27596] ClassLoader class getPackage equal in Java but not equal in Native Image #2989
Comments
@jiekang thanks for reporting the bug |
Thanks. To be clear, I'm curious if this is intentional or not, but I'd also prefer that behavior was the same between Java and native image. |
@jiekang We have added this in our feature list and will be fixed in future releases, |
@mcraj017 Okay sounds good; I appreciate the communication! |
The reason there is a difference between native and Java mode is that this Native Image substitution causes classes loaded by the bootstrap class loader to construct new packages when So in @jiekang's example, 2 independent objects are created and compared. Thus not equal.
This is related to another open issue here: #8796 |
Describe the issue
The default ClassLoader class getPackage is equal in Java but not equal in Native Image. Is this an expected result?
Steps to reproduce the issue
Describe GraalVM and your environment:
4d56547a080c7f97fef5b8e6d19827ed66a0c398
labsjdk-ce-11.0.9-jvmci-20.3-b06
The text was updated successfully, but these errors were encountered: