Skip to content

Commit

Permalink
Fix version check after backport
Browse files Browse the repository at this point in the history
Signed-off-by: Mohit Godwani <mgodwan@amazon.com>
  • Loading branch information
mgodwan committed Jul 26, 2024
1 parent c76bfeb commit 563f69c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public ComposableIndexTemplate(StreamInput in) throws IOException {
this.version = in.readOptionalVLong();
this.metadata = in.readMap();
this.dataStreamTemplate = in.readOptionalWriteable(DataStreamTemplate::new);
if (in.getVersion().onOrAfter(Version.V_3_0_0)) {
if (in.getVersion().onOrAfter(Version.V_2_16_0)) {
this.context = in.readOptionalWriteable(Context::new);
} else {
this.context = null;
Expand Down Expand Up @@ -248,7 +248,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalVLong(this.version);
out.writeMap(this.metadata);
out.writeOptionalWriteable(dataStreamTemplate);
if (out.getVersion().onOrAfter(Version.V_3_0_0)) {
if (out.getVersion().onOrAfter(Version.V_2_16_0)) {
out.writeOptionalWriteable(context);
}
}
Expand Down

0 comments on commit 563f69c

Please sign in to comment.