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.
This commit is contained in:
parent
9be3fbd1b2
commit
443c7014ba
|
@ -115,9 +115,9 @@ public class TransportClusterStateAction extends TransportMasterNodeReadAction<C
|
||||||
mdBuilder = MetaData.builder(currentState.metaData());
|
mdBuilder = MetaData.builder(currentState.metaData());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Filter our metadata that shouldn't be returned by API
|
// filter out metadata that shouldn't be returned by the API
|
||||||
for(ObjectObjectCursor<String, Custom> custom : currentState.metaData().customs()) {
|
for (ObjectObjectCursor<String, Custom> custom : currentState.metaData().customs()) {
|
||||||
if(!custom.value.context().contains(MetaData.XContentContext.API)) {
|
if (custom.value.context().contains(MetaData.XContentContext.API) == false) {
|
||||||
mdBuilder.removeCustom(custom.key);
|
mdBuilder.removeCustom(custom.key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue