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