Adjust serialization versions after backport

Now that elastic/x-pack-elasticsearch#3985 has been backported to 6.x, we can update the version conditions from 7.0.0-alpha1 to 6.3.0

Original commit: elastic/x-pack-elasticsearch@b068ca92a7
This commit is contained in:
javanna 2018-02-22 09:37:38 +01:00 committed by Luca Cavanna
parent 26516c507e
commit 531d44f446
5 changed files with 10 additions and 20 deletions

View File

@ -155,8 +155,7 @@ public class PostCalendarEventsAction extends Action<PostCalendarEventsAction.Re
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
//TODO version needs to be updated once backport to 6.x
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (in.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag was removed
in.readBoolean();
}
@ -166,8 +165,7 @@ public class PostCalendarEventsAction extends Action<PostCalendarEventsAction.Re
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
//TODO version needs to be updated once backport to 6.x
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (out.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag is no longer supported
out.writeBoolean(true);
}

View File

@ -152,8 +152,7 @@ public class PutCalendarAction extends Action<PutCalendarAction.Request, PutCale
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
//TODO version needs to be updated once backport to 6.x
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (in.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag was removed
in.readBoolean();
}
@ -164,8 +163,7 @@ public class PutCalendarAction extends Action<PutCalendarAction.Request, PutCale
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
//TODO version needs to be updated once backport to 6.x
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (out.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag is no longer supported
out.writeBoolean(true);
}

View File

@ -124,8 +124,7 @@ public class PutDatafeedAction extends Action<PutDatafeedAction.Request, PutData
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
//TODO version needs to be updated once backport to 6.x
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (in.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag was removed
in.readBoolean();
}
@ -135,8 +134,7 @@ public class PutDatafeedAction extends Action<PutDatafeedAction.Request, PutData
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
//TODO version needs to be updated once backport to 6.x
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (out.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag is no longer supported
out.writeBoolean(true);
}

View File

@ -149,8 +149,7 @@ public class PutJobAction extends Action<PutJobAction.Request, PutJobAction.Resp
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
//TODO version needs to be updated once backport to 6.x
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (in.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag was removed
in.readBoolean();
}
@ -160,8 +159,7 @@ public class PutJobAction extends Action<PutJobAction.Request, PutJobAction.Resp
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
//TODO version needs to be updated once backport to 6.x
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (out.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag is no longer supported
out.writeBoolean(true);
}

View File

@ -178,8 +178,7 @@ extends Action<RevertModelSnapshotAction.Request, RevertModelSnapshotAction.Resp
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
//TODO version needs to be updated once backport to 6.x
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (in.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag was removed
in.readBoolean();
}
@ -189,8 +188,7 @@ extends Action<RevertModelSnapshotAction.Request, RevertModelSnapshotAction.Resp
@Override
public void writeTo(StreamOutput out) throws IOException {
super.writeTo(out);
//TODO version needs to be updated once backport to 6.x
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1) == false) {
if (out.getVersion().before(Version.V_6_3_0)) {
//the acknowledged flag is no longer supported
out.writeBoolean(true);
}