RFR: 8198526: getAnnotatedOwnerType does not handle static nested classes correctly
cushon at google.com
Wed Dec 19 19:19:41 UTC 2018
I think this fix is appropriate for the other uses of nestingForType.
The underlying problem here is the treatment of nested types in general,
which directly affects getAnnotatedOwnerType, but also applies to
the examples in JDK-8066967.
I added an additional test based on the one in JDK-8066967:
Re: JDK-8148504, javac consistently emits type_path_kind=1 entries for
nested types when there are multiple parts for which type annotations are
admissable. That wasn't consistent with JVMS 11, which expects
type_path_kind=1 entries for all nested types (regardless of whether the
enclosing type is admissable for annotations). The resolution was to update
the spec in JDK-8215035 and leave javac's behaviour unchanged, and this
change is updating reflection to be consistent with the updated spec and
the existing javac behaviour.
More information about the core-libs-dev