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
|
||||
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);
|
||||
} else {
|
||||
out.writeOptionalString(key);
|
||||
|
@ -259,7 +259,7 @@ public class InternalRange<B extends InternalRange.Bucket, R extends InternalRan
|
|||
int size = in.readVInt();
|
||||
List<B> ranges = new ArrayList<>(size);
|
||||
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.readOptionalString();
|
||||
ranges.add(getFactory().createBucket(key, in.readDouble(), in.readDouble(), in.readVLong(),
|
||||
|
|
Loading…
Reference in New Issue