RFR 8189708: class reading issue with named and annotated parameters
Jan Lahoda
jan.lahoda at oracle.com
Fri Oct 20 07:28:53 UTC 2017
Hi Liam,
Thanks for looking at this.
FWIW, I was looking at this problem quite a long time ago under
JDK-8007720, but unfortunately didn't have time to fully finish that.
For completeness, I've put the patch I had at that time here:
http://cr.openjdk.java.net/~jlahoda/8007720/8007720
On 20.10.2017 03:51, Liam Miller-Cushon wrote:
> Hello,
>
> Please consider the following fix for JDK-8189708, which is a class
> reading issue that prevents parameter names from being recorded for
> methods that have both MethodParameters and
> Runtime{Visible,Invisible}ParameterAnnotations attributes.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8189708
> Webrev: http://cr.openjdk.java.net/~cushon/8189708/webrev.00/
A few comments on this patch:
-what happens if there are both runtime invisible and visible
annotations of method's parameters? Seems those that appear later will
overwrite those that appear sooner?
-the MethodSymbol.savedParameterAnnotations is only used during reading
inside the ClassReader, right? It seems wasteful to have it as a field
on each MethodSymbol, better would be a field in ClassReader.
-please check what happens for annotations on constructors of
enums/non-static innerclasses
Thanks,
Jan
More information about the compiler-dev
mailing list