Stream version nit after ff0f540 and ce60585

This commit is contained in:
Albert Zaharovits 2019-01-21 13:45:46 +02:00
parent 468bae29f7
commit 0631322dda
2 changed files with 4 additions and 4 deletions

View File

@ -145,7 +145,7 @@ public final class GetUserPrivilegesResponse extends ActionResponse {
return new FieldPermissionsDefinition.FieldGrantExcludeGroup(grant, exclude);
}));
queries = Collections.unmodifiableSet(in.readSet(StreamInput::readBytesReference));
if (in.getVersion().onOrAfter(Version.V_7_0_0)) {
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
this.allowRestrictedIndices = in.readBoolean();
} else {
this.allowRestrictedIndices = false;
@ -254,7 +254,7 @@ public final class GetUserPrivilegesResponse extends ActionResponse {
output.writeOptionalStringArray(fields.getExcludedFields());
});
out.writeCollection(queries, StreamOutput::writeBytesReference);
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
out.writeBoolean(allowRestrictedIndices);
}
}

View File

@ -613,7 +613,7 @@ public class RoleDescriptor implements ToXContentObject {
this.deniedFields = in.readOptionalStringArray();
this.privileges = in.readStringArray();
this.query = in.readOptionalBytesReference();
if (in.getVersion().onOrAfter(Version.V_7_0_0)) {
if (in.getVersion().onOrAfter(Version.V_6_7_0)) {
allowRestrictedIndices = in.readBoolean();
} else {
allowRestrictedIndices = false;
@ -627,7 +627,7 @@ public class RoleDescriptor implements ToXContentObject {
out.writeOptionalStringArray(deniedFields);
out.writeStringArray(privileges);
out.writeOptionalBytesReference(query);
if (out.getVersion().onOrAfter(Version.V_7_0_0)) {
if (out.getVersion().onOrAfter(Version.V_6_7_0)) {
out.writeBoolean(allowRestrictedIndices);
}
}