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

Jan Lahoda jlahoda at openjdk.java.net
Mon Nov 30 15:59:09 UTC 2020

On Mon, 30 Nov 2020 09:55:56 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits:
>>  - Improving getPermittedSubclasses javadoc.
>>  - Merge branch 'master' into JDK-8246778
>>  - Moving checkPackageAccess from getPermittedSubclasses to a separate method.
>>  - Improving getPermittedSubclasses() javadoc.
>>  - Enhancing the Class.getPermittedSubclasses() test to verify behavior both for sealed classes in named and unnamed modules.
>>  - Removing unnecessary file.
>>  - Tweaking javadoc.
>>  - Reflecting review comments w.r.t. narrowing conversion.
>>  - Improving checks in getPermittedSubclasses()
>>  - Merging master into JDK-8246778
>>  - ... and 2 more: https://git.openjdk.java.net/jdk/compare/6e006223...4d484179
> src/java.base/share/classes/java/lang/Class.java line 4420:
>> 4418:      * {@linkplain #getClassLoader() the defining class loader} of the current
>> 4419:      * {@code Class} object. If a name cannot be converted to the {@code Class}
>> 4420:      * instance, it is silently excluded from the result.
> I think this paragraph will need a little bit of wordsmithing. The 3rd paragraph of getNestMembers might be useful to examine as it more clearly describes how the method attempts to "obtain" the Class object for each of the class names in the NestMembers attribute and maybe some of that wording could be used instead of using the term "convert".
> Minor nit but the prevailing style for the @throws SecurityException is to align the description with the exception, probably best to keep it consistent if you can.

Thanks, I've tried to improve the javadoc here:


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

More information about the compiler-dev mailing list