RFR: 8163370: Reduce number of classes loaded by common usage of java.lang.invoke

Claes Redestad claes.redestad at oracle.com
Tue Aug 9 12:04:49 UTC 2016


Hi,

please review this set of small changes to reduce the number of classes 
defined and pulled in when initializing java.lang.invoke

Webrev: http://cr.openjdk.java.net/~redestad/8163370/webrev/
Bug: https://bugs.openjdk.java.net/browse/JDK-8163370

- Using an EnumMap<Wrapper, MethodHandle> in 
sun.misc.invoke.ValueConversions pulls in 5 EnumMap-related classes, and
- Using result.addAll(Arrays.asList(buf).subList(0, bufCount)) rather 
than a simple for-loop pulls in 5 classes
- A few private enum classes can profitably be replaced with alternative 
logic, removing 4 classes

Thanks!

/Claes


More information about the core-libs-dev mailing list