Skip to content
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

Adopt Java 12 jdk.internal.reflect.Reflection & ASM requirement #5103

Merged
merged 1 commit into from
Mar 20, 2019

Conversation

JasonFengJ9
Copy link
Member

Adopt Java 12 jdk.internal.reflect.Reflection & ASM requirement

Added source directories src_java12 for Java 12 and src_java8 for earlier versions;
Cmvc196982 is modified for Java 12 to get field values via package access method reflection instead of direct field reflection which is prohibited since Java 12;
Updated jdk.internal.org.objectweb.asm.Opcodes.ASM4/ASM5 to ASM7 for Java 12;
Enabled previously disabled tests for Java 12.

Verified manually that this PR passes the tests in #4658 and #4663

closes: #4658
closes: #4663

Reviewers: @pshipton @llxia
FYI: @DanHeidinga

Signed-off-by: Jason Feng fengj@ca.ibm.com

@@ -0,0 +1,53 @@
/*******************************************************************************
* Copyright (c) 20019, 2019 IBM Corp. and others
Copy link
Contributor

Choose a reason for hiding this comment

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

20019 should be 2019 :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Aha, fixed.

@llxia
Copy link
Contributor

llxia commented Mar 15, 2019

we need to update copyright for test/functional/JavaAgentTest/build.xml

Added source directories src_java12 for Java 12 and src_java8 for
earlier versions;
Cmvc196982 is modified for Java 12 to get field values via package
access method reflection instead of direct field reflection which is
prohibited since Java 12;
Updated jdk.internal.org.objectweb.asm.Opcodes.ASM4/ASM5 to ASM7 for
Java 12;
Enabled previously disabled tests for Java 12.

Signed-off-by: Jason Feng <fengj@ca.ibm.com>
@pshipton
Copy link
Member

I don't understand how these changes fix #4658 NoSuchFieldException: annotations

@JasonFengJ9 any idea why your Eclipse ECA check is failing? Do you need to sign a new agreement?

@JasonFengJ9
Copy link
Member Author

It seems so though there was an email (Mar 9th) stated that it will expire in 14 days.
At this moment, can't revalidate due to Unable to connect to foundation database.

@pshipton
Copy link
Member

Jason explained the change is in test/functional/JavaAgentTest/src_java12/org/openj9/test/javaagenttest/Cmvc196982.java

Copy link
Contributor

@keithc-ca keithc-ca left a comment

Choose a reason for hiding this comment

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

Rather than duplicate all this code, couldn't the decision to use ASM4 or ASM7 be made at runtime based on the VM version?

@JasonFengJ9
Copy link
Member Author

Rather than duplicate all this code, couldn't the decision to use ASM4 or ASM7 be made at runtime based on the VM version?

It is the compilation issue. Earlier Javac doesn't recognize ASM7.

@pshipton
Copy link
Member

jenkins test sanity plinux jdk11,jdk12

@pshipton
Copy link
Member

jenkins test extended plinux jdk11,jdk12

@pshipton pshipton dismissed keithc-ca’s stale review March 20, 2019 20:25

The ASM7 constant doesn't exist in Java 8.

@pshipton pshipton merged commit 9294a81 into eclipse-openj9:master Mar 20, 2019
@JasonFengJ9 JasonFengJ9 deleted the flushreflection branch March 22, 2019 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants