Skip to content

Commit 443c701

Browse files
authored
Make TransportClusterStateAction abide to our style (#30697)
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.
1 parent 9be3fbd commit 443c701

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

server/src/main/java/org/elasticsearch/action/admin/cluster/state/TransportClusterStateAction.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,9 @@ protected void masterOperation(final ClusterStateRequest request, final ClusterS
115115
mdBuilder = MetaData.builder(currentState.metaData());
116116
}
117117

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

0 commit comments

Comments
 (0)