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
8255005: Fix indentation levels in classFileParser.cpp #931
Conversation
👋 Welcome back hseigel! A progress list of the required criteria for merging this PR into |
Webrevs
|
record_attribute_start = cfs->current(); | ||
record_attribute_length = attribute_length; | ||
} | ||
cfs->skip_u1(attribute_length, CHECK); |
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.
Minor nit, since records, permitted subclasses and an unknown attribute type all do a "cfs->skip_u1(attribute_length, CHECK);" as the last action, you could pull that out to the end of the else if (_major_version >= JAVA_16_VERSION) statement.
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.
Thanks for looking at this. Please see latest commit that contains the changes you suggested.
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.
One minor nit for you to consider. Overall looks good!
@hseigel 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 14 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 |
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.
Thanks for making that change.
} else if (_major_version >= JAVA_15_VERSION) { | ||
// Check for PermittedSubclasses tag | ||
if (tag == vmSymbols::tag_permitted_subclasses()) { | ||
} else if (_major_version >= JAVA_16_VERSION) { |
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.
I don't understand why you changed it from >= 15 to >= 16.
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.
It was changed to 16 because, starting with 16, Records is a new non-preview feature. So, the Record attribute is for class file version 60 or later. 60 is the major class file version for JDK-16.
Sealed types are still preview but require class file version 60.65535. Preview features must always have the latest major class file version (and minor version of 655353).
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.
Okay, thank you for the explanation about preview features. Looks good to me.
} else if (_major_version >= JAVA_15_VERSION) { | ||
// Check for PermittedSubclasses tag | ||
if (tag == vmSymbols::tag_permitted_subclasses()) { | ||
} else if (_major_version >= JAVA_16_VERSION) { |
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.
Okay, thank you for the explanation about preview features. Looks good to me.
/integrate |
@hseigel Since your change was applied there have been 14 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 8a065ef. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Please review this very small change to fix indentation in classFileParser.cpp and move the check for the PermittedSubclasses attribute inside of the "if (major_version >= 16)" block.
Fix was tested with tiers 1 and 2 on Linux, Mac OSX, and Windows, and tiers 3-5 on Linux x64.
Thanks, Harold
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/931/head:pull/931
$ git checkout pull/931