Corrected ByteSizeValue bwc serialization version after backport to 6.x

This commit is contained in:
Christoph Büscher 2017-12-15 08:56:59 +01:00
parent e9160fc014
commit 54b1fed5b3
1 changed files with 2 additions and 2 deletions

View File

@ -39,7 +39,7 @@ public class ByteSizeValue implements Writeable, Comparable<ByteSizeValue> {
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<ByteSizeValue> {
@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);