On Tue, 15 Aug 2023 11:29:45 GMT, Andrey Turbanov <aturba...@openjdk.org> wrote:

>> A few classes in `sun.net.www` package have non-final fields which could 
>> easily be marked `final`.
>
> Andrey Turbanov has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8314261: Make fields final in sun.net.www

Looks good to me.

src/java.base/share/classes/sun/net/www/MimeTable.java line 48:

> 46: 
> 47:     /** Keyed by content type, returns MimeEntries */
> 48:     private final Hashtable<String, MimeEntry> entries = new 
> Hashtable<>();

Drive-by observation: These two `Hashtable`s can be changed to `HashMap` since 
every method that uses them is `synchronized`, making the implicit 
synchronization from `Hashtable` redundant.

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

Marked as reviewed by redestad (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14977#pullrequestreview-1578390240
PR Review Comment: https://git.openjdk.org/jdk/pull/14977#discussion_r1294482151

Reply via email to