diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java index 6f97bb47c66..9c1592704ed 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/security/authc/esnative/NativeUsersStore.java @@ -404,7 +404,6 @@ public class NativeUsersStore extends AbstractComponent implements ClusterStateL .execute(new ActionListener() { @Override public void onResponse(UpdateResponse updateResponse) { - assert updateResponse.getResult() == Result.UPDATED; clearRealmCache(username, listener, null); } diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java index a2c7eee7a8b..94f6124f21e 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestChangePasswordAction.java @@ -60,7 +60,7 @@ public class RestChangePasswordAction extends BaseRestHandler { ChangePasswordResponse changePasswordResponse, XContentBuilder builder) throws Exception { - return new BytesRestResponse(RestStatus.OK, channel.newBuilder().startObject().endObject()); + return new BytesRestResponse(RestStatus.OK, builder.startObject().endObject()); } }); } diff --git a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java b/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java index 4979da3bb19..5e009077018 100644 --- a/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java +++ b/elasticsearch/src/main/java/org/elasticsearch/xpack/security/rest/action/user/RestSetEnabledAction.java @@ -48,7 +48,7 @@ public class RestSetEnabledAction extends BaseRestHandler { .execute(new RestBuilderListener(channel) { @Override public RestResponse buildResponse(SetEnabledResponse setEnabledResponse, XContentBuilder builder) throws Exception { - return new BytesRestResponse(RestStatus.OK, channel.newBuilder().startObject().endObject()); + return new BytesRestResponse(RestStatus.OK, builder.startObject().endObject()); } }); }