RFR: 8364230: javax/swing/text/StringContent can be migrated away from using finalize [v3]

Phil Race prr at openjdk.org
Wed Aug 6 19:39:16 UTC 2025


On Fri, 1 Aug 2025 06:11:21 GMT, Abhishek Kumar <abhiscxk at openjdk.org> wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8364230
>
> 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.

OK ... and it made me notice I wasn't using text/TEXT - fixed that

> 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++) {

ok

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26519#discussion_r2252580252
PR Review Comment: https://git.openjdk.org/jdk/pull/26519#discussion_r2252580366


More information about the client-libs-dev mailing list