RFR: 8246778: Compiler implementation for Sealed Classes (Second Preview) [v2]
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 . 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.
More information about the compiler-dev