Address Checkstyle violations

This commit is contained in:
Andrew Gaul 2014-06-17 15:56:35 -07:00
parent 78ce2baedd
commit dad6c54720
8 changed files with 11 additions and 11 deletions

View File

@ -298,7 +298,7 @@ public class GoogleComputeEngineServiceAdapter implements ComputeServiceAdapter<
public InstanceInZone getNode(String name) {
SlashEncodedIds slashEncodedIds = SlashEncodedIds.fromSlashEncoded(name);
Instance instance= api.getInstanceApiForProject(userProject.get()).getInZone(slashEncodedIds.getFirstId(),
Instance instance = api.getInstanceApiForProject(userProject.get()).getInZone(slashEncodedIds.getFirstId(),
slashEncodedIds.getSecondId());
return instance == null ? null : new InstanceInZone(instance, slashEncodedIds.getFirstId());

View File

@ -241,7 +241,7 @@ public class GoogleComputeEngineSecurityGroupExtension implements SecurityGroupE
@Override
public SecurityGroup addIpPermission(IpProtocol protocol, int fromPort, int toPort,
Multimap<String,String> tenantIdGroupNamePairs, Iterable<String> cidrBlocks,
Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> cidrBlocks,
Iterable<String> groupIds, SecurityGroup group) {
IpPermission.Builder permBuilder = IpPermission.builder();
@ -283,7 +283,7 @@ public class GoogleComputeEngineSecurityGroupExtension implements SecurityGroupE
@Override
public SecurityGroup removeIpPermission(IpProtocol protocol, int fromPort, int toPort,
Multimap<String,String> tenantIdGroupNamePairs, Iterable<String> cidrBlocks,
Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> cidrBlocks,
Iterable<String> groupIds, SecurityGroup group) {
IpPermission.Builder permBuilder = IpPermission.builder();

View File

@ -47,7 +47,7 @@ public class FirewallToIpPermission implements Function<Firewall, Iterable<IpPer
public Iterable<IpPermission> apply(Firewall fw) {
ImmutableSet.Builder setBuilder = ImmutableSet.builder();
for (Rule rule: fw.getAllowed()) {
for (Rule rule : fw.getAllowed()) {
if (!rule.getPorts().isEmpty()) {
for (Range<Integer> r : rule.getPorts().asRanges()) {
IpPermission.Builder builder = populateBuilder(fw, rule.getIpProtocol());

View File

@ -175,7 +175,7 @@ public class CreateNodesWithGroupEncodedIntoNameThenAddToSet extends
for (AtomicReference<Operation> operation : operations) {
retry(operationDonePredicate, operationCompleteCheckTimeout, operationCompleteCheckInterval,
MILLISECONDS).apply(operation);
checkState(!operation.get().getHttpError().isPresent(),"Could not create firewall, operation failed" + operation);
checkState(!operation.get().getHttpError().isPresent(), "Could not create firewall, operation failed" + operation);
}
}

View File

@ -38,7 +38,7 @@ public class Metadata {
@ConstructorProperties({"fingerprint", "items"})
public Metadata(@Nullable String fingerprint, @Nullable Map<String, String> items) {
this.fingerprint = fingerprint;
this.items = items == null ? ImmutableMap.<String,String>of() : items;
this.items = items == null ? ImmutableMap.<String, String>of() : items;
}
/**
@ -100,7 +100,7 @@ public class Metadata {
public static final class Builder {
private ImmutableMap.Builder<String,String> items = ImmutableMap.builder();
private ImmutableMap.Builder<String, String> items = ImmutableMap.builder();
private String fingerprint;
/**

View File

@ -39,7 +39,7 @@ public class MetadataBinder implements MapBinder {
*/
@Override
public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
Map<String, String> items = ImmutableMap.copyOf((Map<String,String>)checkNotNull(postParams.get("items"), "item"));
Map<String, String> items = ImmutableMap.copyOf((Map<String, String>)checkNotNull(postParams.get("items"), "item"));
String fingerprint = (String) checkNotNull(postParams.get("fingerprint"), "fingerprint");
Metadata metadata = Metadata.builder()
.fingerprint(fingerprint)

View File

@ -33,7 +33,7 @@ public class NetworkFirewallPredicates {
@Override
public boolean apply(Firewall fw) {
for (Rule rule: fw.getAllowed()) {
for (Rule rule : fw.getAllowed()) {
if (rule.getIpProtocol().equals(protocol)) {
return true;
}
@ -95,7 +95,7 @@ public class NetworkFirewallPredicates {
public boolean apply(Firewall input) {
boolean groupsMatchTags = (permission.getGroupIds().isEmpty() && input.getSourceTags().isEmpty())
|| !Sets.intersection(permission.getGroupIds(), input.getSourceTags()).isEmpty();
boolean cidrsMatchRanges =(permission.getCidrBlocks().isEmpty() && input.getSourceRanges().isEmpty())
boolean cidrsMatchRanges = (permission.getCidrBlocks().isEmpty() && input.getSourceRanges().isEmpty())
|| !Sets.intersection(permission.getCidrBlocks(), input.getSourceRanges()).isEmpty();
boolean firewallHasPorts = hasProtocol(permission.getIpProtocol()).apply(input)
&& ((permission.getFromPort() == 0 && permission.getToPort() == 0)

View File

@ -344,7 +344,7 @@ public class GoogleComputeEngineServiceExpectTest extends BaseGoogleComputeEngin
.addHeader("Accept", "application/json")
.addHeader("Authorization", "Bearer " + TOKEN).build();
HttpRequest deleteDiskRequest= HttpRequest.builder()
HttpRequest deleteDiskRequest = HttpRequest.builder()
.method("DELETE")
.endpoint("https://www.googleapis" +
".com/compute/v1/projects/myproject/zones/us-central1-a/disks/test")