Skip to content

Commit

Permalink
use before instead of onOrBefore
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvg committed Jul 18, 2018
1 parent 1924f5d commit 53ab470
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
Expand Down

0 comments on commit 53ab470

Please sign in to comment.