RFR: 8314261: Make fields final in sun.net.www [v4]

Jaikiran Pai jpai at openjdk.org
Thu Aug 17 01:19:32 UTC 2023


On Wed, 16 Aug 2023 07:49:40 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:

>> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8314261: Make fields final in sun.net.www
>>   
>>   fix B5045306 test failure
>
> src/java.base/share/classes/sun/net/www/http/ChunkedOutputStream.java line 63:
> 
>> 61:     /* the chunk size we use */
>> 62:     private final int preferredChunkDataSize;
>> 63:     private final int preferedHeaderSize;
> 
> Is it a typo `prefered` ?
> Other fields use `preferred` prefix.

Hello Andrey, I don't have a strong preference. However, like you note, the other fields are using double `r` and we are anyway in this area changing that code, so I think it's OK to rename this field to use double `r` too. Furthermore, there's no similarly named getter for this field, so changing this field doesn't cause any other impact.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14977#discussion_r1296576908


More information about the net-dev mailing list