RFR: JDK-6826789: SecureClassLoader should not use CodeSource URLs as HashMap keys

Sean Mullan sean.mullan at oracle.com
Thu Jun 11 13:54:15 UTC 2015


This is the fifth in a series of fixes for JEP 232 (Improve
Secure Application Performance) [1].

webrev:
http://cr.openjdk.java.net/~mullan/webrevs/6826789/webrev.00/
bug: https://bugs.openjdk.java.net/browse/JDK-6826789

This fix changes the keys used in the ProtectionDomain cache in 
SecureClassLoader from URLs to Strings. The URL.hashCode method can 
trigger a potentially expensive name service lookup. The String form of 
the URL avoids that lookup, resulting in a big performance improvement.

Thanks,
Sean

[1] http://openjdk.java.net/jeps/232



More information about the security-dev mailing list