RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]

Chris Hegarty chegar at openjdk.java.net
Wed Dec 2 12:39:59 UTC 2020

On Wed, 2 Dec 2020 12:11:16 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

>> Yes, would be a surprise if getPermittedSubclasses returned Class objects for classes that are not subclasses. I think it should be okay to separate that out to a separate issue so that it can be further re-examined after JEP 397 goes in.
> FWIW: I plan to change the method to not return such Class objects. It just will do the verification in Java, while for getNestMembers it is done in native. The follow up is for investigate the possibility of making the internal behavior consistent with how getNestMembers work.

For the record: similar/related questions/comments have been made on a-s-e [1][2]. The questions/comments were made in order to clarify the JVMS specification, so as to better inform what responsibilities are part Core Reflection versus what are part of the VM.

[1] https://mail.openjdk.java.net/pipermail/amber-spec-experts/2020-October/002626.html
[2] https://mail.openjdk.java.net/pipermail/amber-spec-experts/2020-November/002660.html


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

More information about the compiler-dev mailing list