RFR: JDK-8267936: PreserveAllAnnotations option isn't tested

Peter Levart plevart at openjdk.java.net
Wed Jun 2 10:45:30 UTC 2021


On Tue, 1 Jun 2021 09:30:40 GMT, Jaroslav Tulach <github.com+26887752+JaroslavTulach at openjdk.org> wrote:

> There doesn't seem to be much support for the complete changes in #4245. To get at least something useful from that endeavor I have extracted the test for existing behavior of `-XX:+PreserveAllAnnotations` and I am offering it in this pull request without any changes to the JVM behavior.

test/jdk/java/lang/annotation/AnnotationType/AnnotationTypeChangedToRuntimeTest.java line 42:

> 40:  * {@link RetentionPolicy#CLASS CLASS} retention was changed into
> 41:  * {@link RetentionPolicy#RUNTIME RUNTIME} and we want to read
> 42:  * its value during runtime with the help of

I would insert the phrase ", but the classes that use the annotation have not been recompiled" after the `RUNTIME`.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4280


More information about the core-libs-dev mailing list