RFR (XS): 8148044: Remove Enum[0] constants from EnumSet and EnumMap

Claes Redestad claes.redestad at oracle.com
Fri Jan 22 11:34:05 UTC 2016


Hi,

this patch removes some arguably unnecessary Enum[0] constants from 
EnumMap, EnumSet, and an associated test.

The one in EnumMap was unused, while the one in EnumSet was only used 
for serialization purposes. Doing this for performance seems 
questionable[1].

During testing I discovered that EnumSet was missing a serialVersionUID, 
which needs to be added.

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

Thanks!

Claes

[1] 
http://shipilev.net/blog/2016/arrays-wisdom-ancients/#_caching_the_array



More information about the core-libs-dev mailing list