Skip to content

Commit

Permalink
Adapt bwc versions after backporting #31045 to 6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
bleskes committed Jun 4, 2018
1 parent 4a19118 commit 1e5dc50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public PersistentTask(StreamInput in) throws IOException {
id = in.readString();
allocationId = in.readLong();
taskName = in.readString();
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
params = (P) in.readNamedWriteable(PersistentTaskParams.class);
} else {
params = (P) in.readOptionalNamedWriteable(PersistentTaskParams.class);
Expand All @@ -328,7 +328,7 @@ public void writeTo(StreamOutput out) throws IOException {
out.writeString(id);
out.writeLong(allocationId);
out.writeString(taskName);
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
out.writeNamedWriteable(params);
} else {
out.writeOptionalNamedWriteable(params);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
taskId = in.readString();
taskName = in.readString();
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
params = in.readNamedWriteable(PersistentTaskParams.class);
} else {
params = in.readOptionalNamedWriteable(PersistentTaskParams.class);
Expand All @@ -105,7 +105,7 @@ public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
out.writeString(taskId);
out.writeString(taskName);
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
out.writeNamedWriteable(params);
} else {
out.writeOptionalNamedWriteable(params);
Expand Down

0 comments on commit 1e5dc50

Please sign in to comment.