Re: RFR: 8169629: Annotations with lambda expressions cause AnnotationFormatError [v2]
> 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. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Respond to review feedback. - Changes: - all: https://git.openjdk.java.net/jdk/pull/3294/files - new: https://git.openjdk.java.net/jdk/pull/3294/files/818df21d..db79e3c8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3294&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3294&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/3294.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3294/head:pull/3294 PR: https://git.openjdk.java.net/jdk/pull/3294
Re: RFR: 8169629: Annotations with lambda expressions cause AnnotationFormatError [v2]
On Thu, 1 Apr 2021 12:36:56 GMT, Joel Borggrén-Franck wrote: >> Joe Darcy has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Respond to review feedback. > > src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java > line 497: > >> 495: Method currentMethod = null; >> 496: for(Method method : memberMethods) { >> 497: currentMethod = method; > > I can't see any use of currentMethod, am I missing something? Remnant of a second fix I pulled out for separate handling; I'll remove before pushing. Thanks. - PR: https://git.openjdk.java.net/jdk/pull/3294
Re: RFR: 8169629: Annotations with lambda expressions cause AnnotationFormatError
On Wed, 31 Mar 2021 21:32:35 GMT, Joe Darcy wrote: > 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. Other than the potentially unused var, looks good to me. src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java line 497: > 495: Method currentMethod = null; > 496: for(Method method : memberMethods) { > 497: currentMethod = method; I can't see any use of currentMethod, am I missing something? - Marked as reviewed by jfranck (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/3294