On Fri, 27 Nov 2026 15:21:54 GMT, Jorn Vernee <[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) This class passes ConstantDescs things to super constructor so reference is really unavoidable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33758#discussion_r4723081535
