RFR: 8336412: sun.net.www.MimeTable has a few unused methods

Volkan Yazıcı duke at openjdk.org
Thu Dec 19 16:33:30 UTC 2024


On Thu, 19 Dec 2024 16:23:51 GMT, Volkan Yazıcı <duke at openjdk.org> wrote:

> Cleans up `sun.net.www.MimeTable`:
> 
> * Removes unused methods & variables
> * Removes commented out code
> * Simplifies iterations over arrays

`tier1` tests pass on 91554c5873d4b643ca1234507aece44b33ecfd90 – the run report is shared in the ticket.

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

> 231:                     "/usr/local/etc/mailcap"
> 232:             };
> 233: 

This field hasn't been used since 2007, the epoch of the Git history, it is probably predating even that. I doubt if it will ever be used or is still relevant. Hence, removed it.

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

> 421:         }
> 422: 
> 423:         testTable.save(File.separator + "tmp" +

There is no method called `save()` anyway. (I guess historically its the predecessor of `saveAsProperties()`.)

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

PR Comment: https://git.openjdk.org/jdk/pull/22831#issuecomment-2554949044
PR Review Comment: https://git.openjdk.org/jdk/pull/22831#discussion_r1892658735
PR Review Comment: https://git.openjdk.org/jdk/pull/22831#discussion_r1892662354


More information about the net-dev mailing list