From 54b1fed5b381610bd4899067d66e199527c80e45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20B=C3=BCscher?= Date: Fri, 15 Dec 2017 08:56:59 +0100 Subject: [PATCH] Corrected ByteSizeValue bwc serialization version after backport to 6.x --- .../java/org/elasticsearch/common/unit/ByteSizeValue.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);