8148044: Remove Enum[0] constants from EnumSet and EnumMap

Reviewed-by: alanb, chegar, shade, smarks
This commit is contained in:
Claes Redestad 2016-01-25 12:23:55 +01:00
parent 1cbdf12c05
commit 60134cc040
4 changed files with 12 additions and 10 deletions

View file

@ -92,8 +92,6 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
*/
final Enum<?>[] universe;
private static Enum<?>[] ZERO_LENGTH_ENUM_ARRAY = new Enum<?>[0];
EnumSet(Class<E>elementType, Enum<?>[] universe) {
this.elementType = elementType;
this.universe = universe;
@ -421,6 +419,9 @@ public abstract class EnumSet<E extends Enum<E>> extends AbstractSet<E>
private static class SerializationProxy <E extends Enum<E>>
implements java.io.Serializable
{
private static final Enum<?>[] ZERO_LENGTH_ENUM_ARRAY = new Enum<?>[0];
/**
* The element type of this enum set.
*