Bläddra i källkod

Remove PROTOTYPE from VersionType

Nik Everett 9 år sedan
förälder
incheckning
ca54b408a3
1 ändrade filer med 1 tillägg och 8 borttagningar
  1. 1 8
      core/src/main/java/org/elasticsearch/index/VersionType.java

+ 1 - 8
core/src/main/java/org/elasticsearch/index/VersionType.java

@@ -266,8 +266,6 @@ public enum VersionType implements Writeable<VersionType> {
 
     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<VersionType> {
         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());