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:
parent
730ec1ddfb
commit
5c2a5f2e37
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue