use before instead of onOrBefore

This commit is contained in:
Martijn van Groningen 2018-07-18 13:33:57 +02:00
parent 1924f5d07c
commit 53ab470264
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 2 additions and 2 deletions

View File

@ -322,7 +322,7 @@ public class PainlessExecuteAction extends Action<PainlessExecuteAction.Response
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 class PainlessExecuteAction extends Action<PainlessExecuteAction.Response
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);