RFR: JDK-8267936: PreserveAllAnnotations option isn't tested
Alan Bateman
Alan.Bateman at oracle.com
Wed Jun 2 07:18:22 UTC 2021
On 01/06/2021 21:28, John Rose wrote:
> :
>
> Note to self and other reviewers of future versions
> of the JVMS: When you see proposed language like
> the “unless…” of JVMS 4.7.17, remember today's
> conversation and try to avoid putting dark corners
> like that into the JVMS.
>
> The RuntimeInvisibleAnnotations attribute is similar to the RuntimeVisibleAnnotations attribute (§4.7.16), except that the annotations represented by a RuntimeInvisibleAnnotations attribute must not be made available for return by reflective APIs, [[WE SHOULD HAVE STOPPED HERE]] unless the Java Virtual Machine has been instructed to retain these annotations via some implementation-specific mechanism such as a command line flag. In the absence of such instructions, the Java Virtual Machine ignores this attribute.
> https://docs.oracle.com/javase/specs/jvms/se16/html/jvms-4.html#jvms-4.7.17
>
Maybe the "unless ..." could be dropped from the JVMS in some future
release. The XX option could be deprecated now so that it won't be a
surprise when it becomes obsolete. On the other hand, maybe it's not
worth doing anything as there are more important things to work on.
-Alan
More information about the core-libs-dev
mailing list