-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
JDK-8292060: Make ClassFileVersionTest.java version adapting #9796
Conversation
👋 Welcome back darcy! A progress list of the required criteria for merging this PR into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. Thanks!
@jddarcy This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 25 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
/integrate |
/integrate |
Going to push as commit ae1a9a0.
Your commit was automatically rebased without conflicts. |
@jddarcy The command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jddarcy please note that hotspot changes, including tests, are subject to a two review rule.
I'm not sure this makes that much difference versus editing the jcod file. Can we define a fake preview class to use instead?
* compilation. If a particular class becomes non-preview, any | ||
* currently preview class can be substituted in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This potentially will need changing on each release so doesn't really make the test more stable.
The goal of this update is to allow ClassFileVersionTest.java to be modified less often while still testing class files of the latest version.
Since the build policy of the JDK is to use the latest source and target, the class files in the java.base module will have the latest major version. By having the test file itself reference a preview API, its class file will have a nonzero minor version. (Simply compiling under "--enable-preview -source ${jdk.version}" is not sufficient to cause the minor version bits to be set.)
As written, the test now only need to be updated when the referenced API goes non-preview as opposed needing to be updated for every feature release.
After JDK-8289106 is fixed, setting latestMajor can be changed to something like
ClassFileFormatVersion.latest().major()
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9796/head:pull/9796
$ git checkout pull/9796
Update a local copy of the PR:
$ git checkout pull/9796
$ git pull https://git.openjdk.org/jdk pull/9796/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9796
View PR using the GUI difftool:
$ git pr show -t 9796
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9796.diff