Adjust BWC version on OS pretty name

This commit adjusts the BWC version the OS pretty name field on OsInfo
now that this field has been backported to the 6.x development branch.
This commit is contained in:
Jason Tedor 2018-11-08 12:24:10 -05:00
parent 730ec1ddfb
commit 5c2a5f2e37
No known key found for this signature in database
GPG Key ID: FA89F05560F16BC5
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ public class OsInfo implements Writeable, ToXContentFragment {
this.availableProcessors = in.readInt();
this.allocatedProcessors = in.readInt();
this.name = in.readOptionalString();
if (in.getVersion().onOrAfter(Version.V_7_0_0)) {
if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
this.prettyName = in.readOptionalString();
} else {
this.prettyName = null;
@ -76,7 +76,7 @@ public class OsInfo implements Writeable, ToXContentFragment {
out.writeInt(availableProcessors);
out.writeInt(allocatedProcessors);
out.writeOptionalString(name);
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
if (out.getVersion().onOrAfter(Version.V_6_6_0)) {
out.writeOptionalString(prettyName);
}
out.writeOptionalString(arch);