mirror of https://github.com/apache/jclouds.git
Address confusing operator precedence
Found via error-prone.
This commit is contained in:
parent
2a04a52d56
commit
25baad6d32
|
@ -93,8 +93,8 @@ public class BaseEnvelopeHandler<V extends BaseVirtualSystem<V>, B extends BaseV
|
|||
inNetwork = true;
|
||||
} else if (equalsOrSuffix(qName, "VirtualSystem")) {
|
||||
inVirtualSystem = true;
|
||||
} else if (extensionHandlers.containsKey(qName) || attributes.containsKey("type")
|
||||
&& extensionHandlers.containsKey(attributes.get("type"))) {
|
||||
} else if (extensionHandlers.containsKey(qName) || (attributes.containsKey("type")
|
||||
&& extensionHandlers.containsKey(attributes.get("type")))) {
|
||||
inExtensionSection = true;
|
||||
extensionHandler = extensionHandlers.get(qName).get();
|
||||
} else if (qName.endsWith("Section")) {
|
||||
|
|
|
@ -418,8 +418,8 @@ public class StubComputeServiceIntegrationTest extends BaseComputeServiceLiveTes
|
|||
if (o == null || !this.getClass().equals(o.getClass()))
|
||||
return false;
|
||||
PayloadEquals other = (PayloadEquals) o;
|
||||
return this.expected == null && other.expected == null || this.expected != null
|
||||
&& this.expected.equals(other.expected);
|
||||
return (this.expected == null && other.expected == null) ||
|
||||
(this.expected != null && this.expected.equals(other.expected));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -179,8 +179,8 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptions
|
|||
|
||||
@Override
|
||||
protected boolean userSpecifiedTheirOwnGroups(TemplateOptions options) {
|
||||
return options instanceof AWSEC2TemplateOptions
|
||||
&& !AWSEC2TemplateOptions.class.cast(options).getGroupIds().isEmpty()
|
||||
return (options instanceof AWSEC2TemplateOptions
|
||||
&& !AWSEC2TemplateOptions.class.cast(options).getGroupIds().isEmpty())
|
||||
|| super.userSpecifiedTheirOwnGroups(options);
|
||||
}
|
||||
|
||||
|
|
|
@ -183,7 +183,7 @@ public final class GoogleComputeEngineServiceAdapter
|
|||
// Add lookup for InstanceToNodeMetadata
|
||||
diskURIToImage.getUnchecked(instance.get().disks().get(0).source());
|
||||
|
||||
if (options.autoCreateWindowsPassword() != null && options.autoCreateWindowsPassword()
|
||||
if ((options.autoCreateWindowsPassword() != null && options.autoCreateWindowsPassword())
|
||||
|| OsFamily.WINDOWS == template.getImage().getOperatingSystem().getFamily()) {
|
||||
Map<String, ?> params = ImmutableMap.of("instance", instance, "zone", zone, "email", create.user(), "userName", credentials.getUser());
|
||||
String password = windowsPasswordGenerator.apply(params);
|
||||
|
|
Loading…
Reference in New Issue