RFR: 8265130: Make ConstantDesc class hierarchy sealed [v3]
liach
github.com+7806504+liach at openjdk.java.net
Fri May 21 03:29:31 UTC 2021
On Thu, 20 May 2021 22:13:51 GMT, Gavin Bierman <gbierman at openjdk.org> wrote:
>> Hi all,
>>
>> Please review this patch to make the ConstantDesc hierarchy `sealed`, as was promised in its Javadoc, now that sealed classes are finalising in JDK 17.
>>
>> Thanks,
>> Gavin
>
> Gavin Bierman has updated the pull request incrementally with one additional commit since the last revision:
>
> Removing file constants.patch added by mistake
src/java.base/share/classes/java/lang/constant/ClassDesc.java line 56:
> 54: * @since 12
> 55: */
> 56: sealed public interface ClassDesc
Should move `sealed` behind `public` per the blessed modifier order from JLS. https://docs.oracle.com/javase/specs/jls/se16/preview/specs/sealed-classes-jls.html#jls-8.1.1
Per http://openjdk.java.net/jeps/409 the finalized sealed classes have no difference from that in 16, so the order suggested there should be valid.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4135
More information about the core-libs-dev
mailing list