Skip to content

Commit

Permalink
Remove obsolete BWC check in PutPipelineRequest (elastic#80196)
Browse files Browse the repository at this point in the history
  • Loading branch information
danhermann committed Nov 8, 2021
1 parent 4dc7d70 commit 410c067
Showing 1 changed file with 2 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

package org.elasticsearch.action.ingest;

import org.elasticsearch.Version;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.action.support.master.AcknowledgedRequest;
import org.elasticsearch.common.bytes.BytesReference;
Expand Down Expand Up @@ -48,11 +47,7 @@ public PutPipelineRequest(StreamInput in) throws IOException {
id = in.readString();
source = in.readBytesReference();
xContentType = in.readEnum(XContentType.class);
if (in.getVersion().onOrAfter(Version.V_7_16_0)) {
version = in.readOptionalInt();
} else {
version = null;
}
version = in.readOptionalInt();
}

PutPipelineRequest() {
Expand Down Expand Up @@ -86,9 +81,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(id);
out.writeBytesReference(source);
XContentHelper.writeTo(out, xContentType);
if (out.getVersion().onOrAfter(Version.V_7_16_0)) {
out.writeOptionalInt(version);
}
out.writeOptionalInt(version);
}

@Override
Expand Down

0 comments on commit 410c067

Please sign in to comment.