Merge pull request #962 from andrewgaul/checkstyle-simplify-boolean-expression

Ensure simple boolean expressions via Checkstyle
This commit is contained in:
Adrian Cole 2012-11-06 05:05:13 -08:00
commit 48eab9bf3d
3 changed files with 3 additions and 2 deletions

View File

@ -242,7 +242,7 @@ public class RequestAuthorizeSignature implements HttpRequestFilter, RequestSign
char separator = '?'; char separator = '?';
for (String paramName : Ordering.natural().sortedCopy(params.keySet())) { for (String paramName : Ordering.natural().sortedCopy(params.keySet())) {
// Skip any parameters that aren't part of the canonical signed string // Skip any parameters that aren't part of the canonical signed string
if (SIGNED_PARAMETERS.contains(paramName) == false) if (!SIGNED_PARAMETERS.contains(paramName))
continue; continue;
toSign.append(separator).append(paramName); toSign.append(separator).append(paramName);
String paramValue = get(params.get(paramName), 0); 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); machineUtils.runScriptOnNode(partialNodeMetadata, new DeleteGShadowLock(), RunScriptOptions.NONE);
if(optionalNatIfaceCard.isPresent()) if(optionalNatIfaceCard.isPresent())
checkState(networkUtils.enableNetworkInterface(partialNodeMetadata, optionalNatIfaceCard.get()) == true, checkState(networkUtils.enableNetworkInterface(partialNodeMetadata, optionalNatIfaceCard.get()),
"cannot enable Nat Interface"); "cannot enable Nat Interface");
LoginCredentials credentials = partialNodeMetadata.getCredentials(); LoginCredentials credentials = partialNodeMetadata.getCredentials();

View File

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