From ca54b408a3500306ca0024933f3dd4e62d0deddf Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Fri, 1 Apr 2016 12:44:41 -0400 Subject: [PATCH] Remove PROTOTYPE from VersionType --- .../main/java/org/elasticsearch/index/VersionType.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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());