On Tue, 1 Jun 2021 09:30:40 GMT, Jaroslav Tulach 
<github.com+26887752+jaroslavtul...@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.

Well, if you are willing to take this further, I would suggest you modify the 
test so that it would only test the "correct" behavior and not also the 
"incorrect" one. Meaning, you should test annotated elements (class in you 
case) that are annotated with CLASS retention annotations only (at the time the 
annotation uses are compiled) and not with mixed set (CLASS and RUNTIME 
retention) annotations. In that case the outcome is sensible (and useful).
If others agree that adding such test is OK, I can sponsor it.

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

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

Reply via email to