diff --git a/core/src/main/java/org/elasticsearch/common/unit/ByteSizeValue.java b/core/src/main/java/org/elasticsearch/common/unit/ByteSizeValue.java index 9fb7a3852d7..0981d0c4d72 100644 --- a/core/src/main/java/org/elasticsearch/common/unit/ByteSizeValue.java +++ b/core/src/main/java/org/elasticsearch/common/unit/ByteSizeValue.java @@ -39,7 +39,7 @@ public class ByteSizeValue implements Writeable, Comparable { private final ByteSizeUnit unit; public ByteSizeValue(StreamInput in) throws IOException { - if (in.getVersion().before(Version.V_7_0_0_alpha1)) { + if (in.getVersion().before(Version.V_6_2_0)) { size = in.readVLong(); unit = ByteSizeUnit.BYTES; } else { @@ -50,7 +50,7 @@ public class ByteSizeValue implements Writeable, Comparable { @Override public void writeTo(StreamOutput out) throws IOException { - if (out.getVersion().before(Version.V_7_0_0_alpha1)) { + if (out.getVersion().before(Version.V_6_2_0)) { out.writeVLong(getBytes()); } else { out.writeZLong(size);