Adapt bwc versions after backporting #31045 to 6.3

This commit is contained in:
Boaz Leskes 2018-06-03 21:55:34 +02:00
parent 526f906927
commit 167b9b3656
2 changed files with 4 additions and 4 deletions

View File

@ -313,7 +313,7 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable<M
id = in.readString();
allocationId = in.readLong();
taskName = in.readString();
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
params = (P) in.readNamedWriteable(PersistentTaskParams.class);
} else {
params = (P) in.readOptionalNamedWriteable(PersistentTaskParams.class);
@ -328,7 +328,7 @@ public final class PersistentTasksCustomMetaData extends AbstractNamedDiffable<M
out.writeString(id);
out.writeLong(allocationId);
out.writeString(taskName);
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
out.writeNamedWriteable(params);
} else {
out.writeOptionalNamedWriteable(params);

View File

@ -86,7 +86,7 @@ public class StartPersistentTaskAction extends Action<StartPersistentTaskAction.
super.readFrom(in);
taskId = in.readString();
taskName = in.readString();
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
params = in.readNamedWriteable(PersistentTaskParams.class);
} else {
params = in.readOptionalNamedWriteable(PersistentTaskParams.class);
@ -98,7 +98,7 @@ public class StartPersistentTaskAction extends Action<StartPersistentTaskAction.
super.writeTo(out);
out.writeString(taskId);
out.writeString(taskName);
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
if (out.getVersion().onOrAfter(Version.V_6_3_0)) {
out.writeNamedWriteable(params);
} else {
out.writeOptionalNamedWriteable(params);