RFR: 8265130: Make ConstantDesc class hierarchy sealed [v2]
Thiago Henrique Hüpner
github.com+13357965+thihup at openjdk.java.net
Thu May 20 22:41:29 UTC 2021
On Thu, 20 May 2021 22:28:56 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> 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.
>
> I should have made it clear. I was expecting `DynamicConstantDesc` should be `sealed`. Do you expect non-JDK implementation class extending `DynamicConstantDesc`?
>From the ConstantDesc Javadoc:
* <p>Non-platform classes should not implement {@linkplain ConstantDesc} directly.
* Instead, they should extend {@link DynamicConstantDesc} (as {@link EnumDesc}
* and {@link VarHandleDesc} do.)
-------------
PR: https://git.openjdk.java.net/jdk/pull/4135
More information about the core-libs-dev
mailing list