On Sat, 23 Nov 2024 01:09:30 GMT, Brian Burkhalter <b...@openjdk.org> wrote:
>> src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template line 77: >> >>> 75: static final boolean UNALIGNED = Bits.unaligned(); >>> 76: >>> 77: private @Stable boolean temporary; // defaults to false >> >> Any reason this is `@Stable` instead of `final`? > > I think it avoids setting it to `false` when it is not `true`. A stable means a false value cannot be constant-folded, but since java.nio is not trusted by ciField.cpp, using final is actually worse than a stable :( ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22339#discussion_r1855203993