Browse Source

Fix serialization for plugin info

This commit fixes the serialization for plugin info. Namely, the
serialization incorrectly specified the backwards compatibility version
as strictly after version 5.4.0, whereas it should be on or after
version 5.4.0.
Jason Tedor 8 years ago
parent
commit
4f2dfb6819
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/src/main/java/org/elasticsearch/plugins/PluginInfo.java

+ 2 - 2
core/src/main/java/org/elasticsearch/plugins/PluginInfo.java

@@ -81,7 +81,7 @@ public class PluginInfo implements Writeable, ToXContent {
         this.description = in.readString();
         this.version = in.readString();
         this.classname = in.readString();
-        if (in.getVersion().after(Version.V_5_4_0_UNRELEASED)) {
+        if (in.getVersion().onOrAfter(Version.V_5_4_0_UNRELEASED)) {
             hasNativeController = in.readBoolean();
         } else {
             hasNativeController = false;
@@ -94,7 +94,7 @@ public class PluginInfo implements Writeable, ToXContent {
         out.writeString(description);
         out.writeString(version);
         out.writeString(classname);
-        if (out.getVersion().after(Version.V_5_4_0_UNRELEASED)) {
+        if (out.getVersion().onOrAfter(Version.V_5_4_0_UNRELEASED)) {
             out.writeBoolean(hasNativeController);
         }
     }