diff --git a/core/src/main/java/org/elasticsearch/index/VersionType.java b/core/src/main/java/org/elasticsearch/index/VersionType.java index b8f998b9704..30bc0effd65 100644 --- a/core/src/main/java/org/elasticsearch/index/VersionType.java +++ b/core/src/main/java/org/elasticsearch/index/VersionType.java @@ -266,8 +266,6 @@ public enum VersionType implements Writeable { private final byte value; - private static final VersionType PROTOTYPE = INTERNAL; - VersionType(byte value) { this.value = value; } @@ -383,17 +381,12 @@ public enum VersionType implements Writeable { throw new IllegalArgumentException("No version type match [" + value + "]"); } - @Override - public VersionType readFrom(StreamInput in) throws IOException { + public static VersionType readVersionTypeFrom(StreamInput in) throws IOException { int ordinal = in.readVInt(); assert (ordinal == 0 || ordinal == 1 || ordinal == 2 || ordinal == 3); return VersionType.values()[ordinal]; } - public static VersionType readVersionTypeFrom(StreamInput in) throws IOException { - return PROTOTYPE.readFrom(in); - } - @Override public void writeTo(StreamOutput out) throws IOException { out.writeVInt(ordinal());