diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/ModelPlotConfig.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/ModelPlotConfig.java index 63d0b91230b52..fb781f9019a72 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/ModelPlotConfig.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/ModelPlotConfig.java @@ -5,7 +5,6 @@ */ package org.elasticsearch.xpack.core.ml.job.config; -import org.elasticsearch.Version; import org.elasticsearch.common.ParseField; import org.elasticsearch.common.io.stream.StreamInput; import org.elasticsearch.common.io.stream.StreamOutput; @@ -56,20 +55,14 @@ public ModelPlotConfig(boolean enabled, String terms, Boolean annotationsEnabled public ModelPlotConfig(StreamInput in) throws IOException { enabled = in.readBoolean(); terms = in.readOptionalString(); - if (in.getVersion().onOrAfter(Version.V_8_0_0)) { - annotationsEnabled = in.readBoolean(); - } else { - annotationsEnabled = enabled; - } + annotationsEnabled = in.readBoolean(); } @Override public void writeTo(StreamOutput out) throws IOException { out.writeBoolean(enabled); out.writeOptionalString(terms); - if (out.getVersion().onOrAfter(Version.V_8_0_0)) { - out.writeBoolean(annotationsEnabled); - } + out.writeBoolean(annotationsEnabled); } @Override