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

Roger Riggs rriggs at openjdk.org
Thu Dec 19 17:13:48 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

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

> 368:     }
> 369: 
> 370:     public Properties getAsProperties() {

Along with dropping the methods that might be used outside of the class including the saveAsProperties method, consider making the class final. (This is just part of the implementation so it really doesn't need that declaration)
(I wonder if the Solaris implementation used the subclass or other paths).

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22831#discussion_r1892778084


More information about the net-dev mailing list