Ensure simple boolean expressions via Checkstyle

This commit is contained in:
Andrew Gaul 2012-11-04 18:11:12 -08:00
parent 64a8fd0cbb
commit de82496aae
3 changed files with 3 additions and 2 deletions

View File

@ -242,7 +242,7 @@ public class RequestAuthorizeSignature implements HttpRequestFilter, RequestSign
char separator = '?';
for (String paramName : Ordering.natural().sortedCopy(params.keySet())) {
// Skip any parameters that aren't part of the canonical signed string
if (SIGNED_PARAMETERS.contains(paramName) == false)
if (!SIGNED_PARAMETERS.contains(paramName))
continue;
toSign.append(separator).append(paramName);
String paramValue = get(params.get(paramName), 0);

View File

@ -160,7 +160,7 @@ public class NodeCreator implements Function<NodeSpec, NodeAndInitialCredentials
machineUtils.runScriptOnNode(partialNodeMetadata, new DeleteGShadowLock(), RunScriptOptions.NONE);
if(optionalNatIfaceCard.isPresent())
checkState(networkUtils.enableNetworkInterface(partialNodeMetadata, optionalNatIfaceCard.get()) == true,
checkState(networkUtils.enableNetworkInterface(partialNodeMetadata, optionalNatIfaceCard.get()),
"cannot enable Nat Interface");
LoginCredentials credentials = partialNodeMetadata.getCredentials();

View File

@ -13,6 +13,7 @@
</module>
<module name="ModifierOrder"/>
<module name="MultipleVariableDeclarations"/>
<module name="SimplifyBooleanExpression"/>
<module name="UnusedImports"/>
</module>
<module name="RegexpMultiline">