On Wed, 9 Sep 2026 18:11:04 GMT, Chen Liang <[email protected]> wrote:
>> Convert uses of `@Stable` on instance final non-array fields to >> `@TrustFinalFields`. This gives us a better approximation for what classes >> we wish to migrate to strict final later, and allows the default values in >> these final fields to be constant folded. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Chen Liang has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains six additional commits since > the last revision: > > - No need for blank line in KeyValueHolder > - Dead imports > - Merge branch 'master' of github.com:openjdk/jdk into > fix/stable-instance-final > - Merge branch 'master' of github.com:openjdk/jdk into > fix/stable-instance-final > - Merge branch 'master' of https://github.com/openjdk/jdk into > fix/stable-instance-final > - Remove stable from instance final non-array fields Is the change where you make other final fields trusted intentional? Seems like its an addition and not converting Stable like the issue states. I'm guessing it is, but it should probably be noted. The pending comments show some areas that seemed to be additions of trusting, and may not be exhaustive. src/java.base/share/classes/java/util/ReverseOrderListView.java line 45: > 43: > 44: final List<E> base; > 45: final boolean modifiable; Here src/java.base/share/classes/java/util/zip/ZipFile.java line 88: > 86: private final String fileName; // name of the file > 87: // Used when decoding entry names and comments > 88: private final ZipCoder zipCoder; Here src/java.base/share/classes/jdk/internal/util/NullableKeyValueHolder.java line 76: > 74: public final class NullableKeyValueHolder<K,V> implements Map.Entry<K,V> { > 75: final K key; > 76: final V value; Here ------------- PR Review: https://git.openjdk.org/jdk/pull/32773#pullrequestreview-5225021858 PR Review Comment: https://git.openjdk.org/jdk/pull/32773#discussion_r4027995306 PR Review Comment: https://git.openjdk.org/jdk/pull/32773#discussion_r4028013028 PR Review Comment: https://git.openjdk.org/jdk/pull/32773#discussion_r4028009636
