Skip to content

Commit

Permalink
Adapt bwc version after backport
Browse files Browse the repository at this point in the history
Relates #33587
  • Loading branch information
jimczi committed Oct 5, 2018
1 parent 7d57bdb commit 5c7b52e
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public NestedSortBuilder(StreamInput in) throws IOException {
path = in.readOptionalString();
filter = in.readOptionalNamedWriteable(QueryBuilder.class);
nestedSort = in.readOptionalWriteable(NestedSortBuilder::new);
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_5_0)) {
maxChildren = in.readVInt();
} else {
maxChildren = Integer.MAX_VALUE;
Expand Down Expand Up @@ -98,10 +98,8 @@ public void writeTo(final StreamOutput out) throws IOException {
out.writeOptionalString(path);
out.writeOptionalNamedWriteable(filter);
out.writeOptionalWriteable(nestedSort);
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_5_0)) {
out.writeVInt(maxChildren);
} else {
out.writeVInt(Integer.MAX_VALUE);
}
}

Expand Down

0 comments on commit 5c7b52e

Please sign in to comment.