On Mon, 28 Jul 2025 22:38:03 GMT, Phil Race <p...@openjdk.org> wrote:
> Convert StringContent's Position usage tracking to use a WeakReference > > The test that is added only implicitly tests this but I added it because of a > complete lack of any test for this code. test/jdk/javax/swing/text/AbstractDocument/StringContentPositionTest.java line 38: > 36: static final String text = "hello"; > 37: static final int LEN = text.length(); > 38: static final StringContent st = new StringContent(); For consistency, static final variables can be capitalized. test/jdk/javax/swing/text/AbstractDocument/StringContentPositionTest.java line 56: > 54: positions[i] = st.createPosition(5); > 55: } > 56: for (int i=0; i<SIZE; i++) { Suggestion: for (int i = 0; i < SIZE; i++) { ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26519#discussion_r2247037497 PR Review Comment: https://git.openjdk.org/jdk/pull/26519#discussion_r2247038442