RFR: JDK-8267936: PreserveAllAnnotations option isn't tested
Peter Levart
plevart at openjdk.java.net
Wed Jun 2 14:48:36 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.
What I would do is to add a patch for the parser bug and then extend the test in 3 dimensions:
- run it with and without the `-XX+PreserveAllAnnotations` option (adapt expected results accordingly)
- test annotation use when besides the annotation that changes retention from CLASS -> RUNTIME there is another RUNTIME annotation present on the annotated element or not (this would fail before the bugfix)
- test with different annotated elements (Class, Method, Field, Constructor, Parameter) to exercise different code paths in the VM.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4280
More information about the core-libs-dev
mailing list