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

8169629: Annotations with lambda expressions cause AnnotationFormatError #3294

Closed
wants to merge 2 commits into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Mar 31, 2021

The stricter checks added by
8035781: Improve equality for annotations
in creating the proxy objects used to implement annotations has an unintended by-catch of rejecting annotation's whose type has, say, a field initialized with a lambda expression. While uncommon, it is legal code to have a field in an annotation type.

The updated checks skip over the sort of synthetic method used for the initialization.

Some different compilation tactics were used before and after nest mates, so the test includes compilation and testing under both situations.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8169629: Annotations with lambda expressions cause AnnotationFormatError

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3294/head:pull/3294
$ git checkout pull/3294

Update a local copy of the PR:
$ git checkout pull/3294
$ git pull https://git.openjdk.java.net/jdk pull/3294/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3294

View PR using the GUI difftool:
$ git pr show -t 3294

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3294.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 31, 2021

👋 Welcome back darcy! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 31, 2021
@openjdk
Copy link

openjdk bot commented Mar 31, 2021

@jddarcy The following label will be automatically applied to this pull request:

  • core-libs

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the core-libs core-libs-dev@openjdk.org label Mar 31, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 31, 2021

Webrevs

@jddarcy jddarcy changed the title 8169629: Annotations with lambda expressions cause AnnotationFormatErrorr 8169629: Annotations with lambda expressions cause AnnotationFormatError Mar 31, 2021
for(Method method : memberMethods) {
currentMethod = method;
Copy link
Member

Choose a reason for hiding this comment

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

I can't see any use of currentMethod, am I missing something?

Copy link
Member Author

Choose a reason for hiding this comment

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

Remnant of a second fix I pulled out for separate handling; I'll remove before pushing. Thanks.

Copy link
Member

@jbf jbf left a comment

Choose a reason for hiding this comment

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

Other than the potentially unused var, looks good to me.

@openjdk
Copy link

openjdk bot commented Apr 1, 2021

@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:

8169629: Annotations with lambda expressions cause AnnotationFormatError

Reviewed-by: jfranck

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 15 new commits pushed to the master branch:

  • c04a743: 8264557: Incorrect copyright year for test/micro/org/openjdk/bench/java/lang/MathBench.java after JDK-8264054
  • 4b19771: 8264150: CDS dumping code calls TRAPS functions in VM thread
  • 1dc75e9: 8264538: Rename SystemDictionary::parse_stream
  • 80681b5: 8264546: Dependencies: Context class is always an InstanceKlass
  • fdfa1dd: 8264306: Non deterministic generation of java/lang/invoke/MemberName.class
  • 011f6d1: 8264223: CodeHeap::verify fails extra_hops assertion in fastdebug test
  • 0696fd0: 8263496: MetalHighContrastTheme.getControlHighlight cleanup
  • 6cf1095: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent
  • d2df9a7: 8264331: Use the blessed modifier order in jdk.compiler
  • 0228734: 8262470: Printed GlyphVector outline with low DPI has bad quality on Windows
  • ... and 5 more: https://git.openjdk.java.net/jdk/compare/cb70ab0cb92d1430dedccab8d81334538a62a1e1...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Apr 1, 2021
@jddarcy
Copy link
Member Author

jddarcy commented Apr 1, 2021

/integrate

@openjdk openjdk bot closed this Apr 1, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 1, 2021
@openjdk
Copy link

openjdk bot commented Apr 1, 2021

@jddarcy Since your change was applied there have been 15 commits pushed to the master branch:

  • c04a743: 8264557: Incorrect copyright year for test/micro/org/openjdk/bench/java/lang/MathBench.java after JDK-8264054
  • 4b19771: 8264150: CDS dumping code calls TRAPS functions in VM thread
  • 1dc75e9: 8264538: Rename SystemDictionary::parse_stream
  • 80681b5: 8264546: Dependencies: Context class is always an InstanceKlass
  • fdfa1dd: 8264306: Non deterministic generation of java/lang/invoke/MemberName.class
  • 011f6d1: 8264223: CodeHeap::verify fails extra_hops assertion in fastdebug test
  • 0696fd0: 8263496: MetalHighContrastTheme.getControlHighlight cleanup
  • 6cf1095: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent
  • d2df9a7: 8264331: Use the blessed modifier order in jdk.compiler
  • 0228734: 8262470: Printed GlyphVector outline with low DPI has bad quality on Windows
  • ... and 5 more: https://git.openjdk.java.net/jdk/compare/cb70ab0cb92d1430dedccab8d81334538a62a1e1...master

Your commit was automatically rebased without conflicts.

Pushed as commit 328e951.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org integrated Pull request has been integrated
2 participants