diff --git a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessExecuteAction.java b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessExecuteAction.java index 229c919a2e65d..094a62d188baf 100644 --- a/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessExecuteAction.java +++ b/modules/lang-painless/src/main/java/org/elasticsearch/painless/PainlessExecuteAction.java @@ -322,7 +322,7 @@ public ActionRequestValidationException validate() { public void readFrom(StreamInput in) throws IOException { super.readFrom(in); script = new Script(in); - if (in.getVersion().onOrBefore(Version.V_6_4_0)) { + if (in.getVersion().before(Version.V_6_4_0)) { byte scriptContextId = in.readByte(); assert scriptContextId == 0; } else { @@ -335,7 +335,7 @@ public void readFrom(StreamInput in) throws IOException { public void writeTo(StreamOutput out) throws IOException { super.writeTo(out); script.writeTo(out); - if (out.getVersion().onOrBefore(Version.V_6_4_0)) { + if (out.getVersion().before(Version.V_6_4_0)) { out.writeByte((byte) 0); } else { out.writeString(context.name);