Skip to content

Exclude substituted class from build time initialization#2935

Closed
ziyilin wants to merge 1 commit into
oracle:masterfrom
ziyilin:noSubstitutionClinit
Closed

Exclude substituted class from build time initialization#2935
ziyilin wants to merge 1 commit into
oracle:masterfrom
ziyilin:noSubstitutionClinit

Conversation

@ziyilin

@ziyilin ziyilin commented Oct 21, 2020

Copy link
Copy Markdown
Collaborator

The class substituted with @Substitute or @Delete annotation should not be initialized at build time because it will not appear at run time. It makes no sense to put it in the native heap but causing initialization errors.

This patch fixes the issue #2936


private void addInitializer(AnalysisType t) {
types.put(t, initialTypeInitializerSafety(t));
ResolvedJavaType rt = t.getWrappedWithoutResolve();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would put this whole block in initialTypeInitializerSafety.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@vjovanov

Copy link
Copy Markdown
Member

Otherwise, LGTM.

@ziyilin

ziyilin commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator Author

Otherwise, LGTM.

What is LGTM short for?

The class substituted with @substitute or @delete annotation should not be initialized at build time
because it will not appear in the run time. It makes no sense to put it
in the native heap but causing initialization errors.
@ziyilin
ziyilin force-pushed the noSubstitutionClinit branch from 47ad520 to 30bb408 Compare October 23, 2020 03:25
@zakkak

zakkak commented Oct 23, 2020

Copy link
Copy Markdown
Collaborator

What is LGTM short for?

LGTM = Looks Good To Me

@vjovanov

vjovanov commented Aug 19, 2022

Copy link
Copy Markdown
Member

This fix has been integrated.

@vjovanov vjovanov closed this Aug 19, 2022
@ziyilin
ziyilin deleted the noSubstitutionClinit branch October 12, 2023 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants