Skip to content

Commit

Permalink
Make TransportClusterStateAction abide to our style (#30697)
Browse files Browse the repository at this point in the history
I still do not like == false. However, I am so use to reading it that
today I read this line of code and could not understand how it could
possibly be doing the right thing. It was only when I finally noticed
the ! that the code made sense. This commit changes this code to be in
our style of == false. I still do not like == false.
  • Loading branch information
jasontedor committed May 18, 2018
1 parent 8066b02 commit ee9b9d4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ protected void masterOperation(final ClusterStateRequest request, final ClusterS
mdBuilder = MetaData.builder(currentState.metaData());
}

// Filter our metadata that shouldn't be returned by API
for(ObjectObjectCursor<String, Custom> custom : currentState.metaData().customs()) {
if(!custom.value.context().contains(MetaData.XContentContext.API)) {
// filter out metadata that shouldn't be returned by the API
for (ObjectObjectCursor<String, Custom> custom : currentState.metaData().customs()) {
if (custom.value.context().contains(MetaData.XContentContext.API) == false) {
mdBuilder.removeCustom(custom.key);
}
}
Expand Down

0 comments on commit ee9b9d4

Please sign in to comment.