On Thu, 5 Nov 2026 18:17:14 GMT, Chen Liang <[email protected]> wrote:

> Delegate all initialization to `ConstantDescs` to ensure field initialization 
> order.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

src/java.base/share/classes/jdk/internal/constant/PrimitiveClassDescImpl.java 
line 68:

> 66: 
> 67:     /** {@link ClassDesc} representing the primitive type {@code boolean} 
> */
> 68:     public static @Stable PrimitiveClassDescImpl CD_boolean;

Using `@Stable` seem a bit... hacky? I think it would be better to avoid 
references to `ConstantDescs` from this class, by moving the stuff 
PrimitiveClassDescImpl needs from ConstantDescs into another class (e.g. here 
or maybe ConstantUtils)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/33758#discussion_r4721103314

Reply via email to