RFR: 8265130: Make ConstantDesc class hierarchy sealed [v2]
Gavin Bierman
gbierman at openjdk.java.net
Thu May 20 22:19:42 UTC 2021
On Thu, 20 May 2021 21:32:08 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Gavin Bierman has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Removing javadoc comments about future use of sealed
>
> src/java.base/share/classes/java/lang/constant/DynamicConstantDesc.java line 59:
>
>> 57: * @since 12
>> 58: */
>> 59: non-sealed public abstract class DynamicConstantDesc<T>
>
> can you explain why `DynamicConstantDesc` is non-sealed?
It's a permitted subclass of ConstantDesc, so it must be either `final`, `sealed`, or `non-sealed`. Making it `non-sealed` means it can still be extended.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4135
More information about the core-libs-dev
mailing list