-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8292275: javac does not emit SYNTHETIC and MANDATED flags for parameters by default #9862
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
Closed
SirYwell
wants to merge
27
commits into
openjdk:master
from
SirYwell:fix/enforce-methodparam_attr-if-mandated
Closed
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
829eeca
always write MethodParameters attribute for methods with mandated par…
SirYwell 65b1f46
only write param names when needed
SirYwell aa80719
name index might be 0
SirYwell 12d10d2
split name and flag requirements
SirYwell 09bb0c4
adapt change to constant pool in test
SirYwell cbc3e5d
revert valueOf hack
SirYwell 3cc4c8e
also require flags for synthetic
SirYwell 7c7c193
combine parameter names from LVT and MethodParameters
SirYwell ba7986f
add javac testcase for implicit parameters
SirYwell bac6aec
set mandated flag for parameters of compact constructor
SirYwell 8eb3939
update constant pool indexes in AnnoTest
SirYwell 17df27f
copyright
SirYwell 21c547d
add bug number to test
SirYwell c9ba84c
remove spaces from empty lines in text block
SirYwell e453380
add access flag based test
SirYwell b393150
fix line breaks
SirYwell 55b81f2
add annotation processing test
SirYwell ebb09f8
cleanup
SirYwell 883a2dc
address comments
SirYwell 3bdc996
Merge remote-tracking branch 'upstream/master' into fix/enforce-metho…
SirYwell 4378093
Update copyright year
SirYwell cc5a049
Merge branch 'master' into methodparameters-flags
liach 6183083
Updated RequiredMethodParameterFlagTest, checks against Local classes…
liach 9879b82
Parity for the parameter flag tests in javac and reflection
liach c42e9f3
Update tests
liach 5ac3a21
Merge pull request #1 from liachmodded/methodparameters-flags
SirYwell 400e1ec
Use ternary operator
SirYwell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should the use of MANDATED be conditional on the target class file 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 advise also writing a core reflection test that uses access flags (java.lang.reflect.AccessFlag).
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 think this is needed. The JLS mentions the parameters of canonical record constructors in Java 14 already. Previous versions don't have records and shouldn't enter that method at all.
Will do. I assume the
jdk/java/lang/reflect/AccessFlag
folder is a good place for that?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.
Agreed; I double-checked and the ACC_MANDATED flag was defined in that location since before JDK 14's format.
Yes; that an appropriate home for such tests.