Skip to content

fix: add special handling for Object in Types.newInstance() #2102

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

diegomarquezp
Copy link
Contributor

@diegomarquezp diegomarquezp commented Jun 18, 2025

oracle/graal#11429 confirms a behavior problem when calling Object.class.newInstance(). This is a temporary workaround while the GraalVM team looks into this.

Since Types relies on Class.newInstance(), we add a concrete case for java.lang.Object.class to avoid the mysterious SerializationSupport$StubForAbstractClass that comes instead of Object in Graal 24 compiled images.

More context and investigation in tracking doc.

@diegomarquezp diegomarquezp requested a review from a team as a code owner June 18, 2025 19:52
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Jun 18, 2025
@diegomarquezp diegomarquezp changed the title fix: add NULL_OBJECT to util.Data to work around Graal 24 issue fix: add special handling for Object in Types.newInstance() Jun 19, 2025
Copy link
Contributor

@mpeddada1 mpeddada1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we can also create a follow-up issue here to remove this when GraalVM fixes the issue on their end?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: xs Pull request size is extra small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants