Skip to content

Commit

Permalink
Remove version check after backport (#57516)
Browse files Browse the repository at this point in the history
  • Loading branch information
przemekwitek authored Jun 2, 2020
1 parent 2ddd4f7 commit 5b45400
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/
package org.elasticsearch.xpack.ml.job.results;

import org.elasticsearch.Version;
import org.elasticsearch.common.ParseField;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
Expand Down Expand Up @@ -127,12 +126,8 @@ public AutodetectResult(StreamInput in) throws IOException {
} else {
this.modelPlot = null;
}
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.readBoolean()) {
this.annotation = new Annotation(in);
} else {
this.annotation = null;
}
if (in.readBoolean()) {
this.annotation = new Annotation(in);
} else {
this.annotation = null;
}
Expand Down Expand Up @@ -168,9 +163,7 @@ public void writeTo(StreamOutput out) throws IOException {
writeNullable(modelSnapshot, out);
writeNullable(modelSizeStats, out);
writeNullable(modelPlot, out);
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
writeNullable(annotation, out);
}
writeNullable(annotation, out);
writeNullable(categoryDefinition, out);
writeNullable(flushAcknowledgement, out);
writeNullable(forecast, out);
Expand Down

0 comments on commit 5b45400

Please sign in to comment.