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.
This commit is contained in:
Jason Tedor 2017-03-27 21:04:31 -04:00
parent df67f83834
commit 4f2dfb6819
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}