Update the version checks around range bucket keys, now that the change was backported.
This commit is contained in:
parent
bcfdccaf3f
commit
913778b37a
|
@ -169,7 +169,7 @@ public class InternalRange<B extends InternalRange.Bucket, R extends InternalRan
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeTo(StreamOutput out) throws IOException {
|
public void writeTo(StreamOutput out) throws IOException {
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||||
out.writeString(key);
|
out.writeString(key);
|
||||||
} else {
|
} else {
|
||||||
out.writeOptionalString(key);
|
out.writeOptionalString(key);
|
||||||
|
@ -259,7 +259,7 @@ public class InternalRange<B extends InternalRange.Bucket, R extends InternalRan
|
||||||
int size = in.readVInt();
|
int size = in.readVInt();
|
||||||
List<B> ranges = new ArrayList<>(size);
|
List<B> ranges = new ArrayList<>(size);
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
String key = in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)
|
String key = in.getVersion().onOrAfter(Version.V_6_4_0)
|
||||||
? in.readString()
|
? in.readString()
|
||||||
: in.readOptionalString();
|
: in.readOptionalString();
|
||||||
ranges.add(getFactory().createBucket(key, in.readDouble(), in.readDouble(), in.readVLong(),
|
ranges.add(getFactory().createBucket(key, in.readDouble(), in.readDouble(), in.readVLong(),
|
||||||
|
|
Loading…
Reference in New Issue