diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/util/AtmosUtils.java b/apis/atmos/src/main/java/org/jclouds/atmos/util/AtmosUtils.java index e497b5a714..6c746bd6fa 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/util/AtmosUtils.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/util/AtmosUtils.java @@ -77,7 +77,7 @@ public class AtmosUtils { try { sync.createFile(container, object, options); - } catch(KeyAlreadyExistsException e) { + } catch (KeyAlreadyExistsException e) { deletePathAndEnsureGone(sync, path); sync.createFile(container, object, options); } diff --git a/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java index 6f4da6f0a5..2809887031 100644 --- a/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/blobstore/AtmosBlobRequestSignerTest.java @@ -48,7 +48,7 @@ import com.google.inject.Module; @Test(groups = "unit", testName = "AtmosBlobRequestSignerTest") public class AtmosBlobRequestSignerTest extends BaseAsyncClientTest { - public AtmosBlobRequestSignerTest(){ + public AtmosBlobRequestSignerTest() { // this is base64 decoded in the signer; credential = "aaaabbbb"; } diff --git a/apis/byon/src/main/java/org/jclouds/byon/functions/NodeToNodeMetadata.java b/apis/byon/src/main/java/org/jclouds/byon/functions/NodeToNodeMetadata.java index fabc77d7a3..c84b647609 100644 --- a/apis/byon/src/main/java/org/jclouds/byon/functions/NodeToNodeMetadata.java +++ b/apis/byon/src/main/java/org/jclouds/byon/functions/NodeToNodeMetadata.java @@ -102,7 +102,7 @@ public class NodeToNodeMetadata implements Function { } else if (from.getCredential() != null) { credBuilder.credential(from.getCredential()); } - if (from.getSudoPassword() != null){ + if (from.getSudoPassword() != null) { credBuilder.password(from.getSudoPassword()); credBuilder.authenticateSudo(true); } diff --git a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java index 39f347b68b..41d9885370 100644 --- a/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java +++ b/apis/cloudfiles/src/main/java/org/jclouds/cloudfiles/CloudFilesApiMetadata.java @@ -69,7 +69,7 @@ public class CloudFilesApiMetadata extends SwiftApiMetadata { public static class Builder extends SwiftApiMetadata.Builder { @SuppressWarnings("deprecation") - protected Builder(){ + protected Builder() { super(CloudFilesClient.class, CloudFilesAsyncClient.class); id("cloudfiles") .name("Rackspace Cloud Files API") diff --git a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/CloudFilesClientLiveTest.java b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/CloudFilesClientLiveTest.java index c38250d948..0a5c77a13c 100644 --- a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/CloudFilesClientLiveTest.java +++ b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/CloudFilesClientLiveTest.java @@ -41,7 +41,7 @@ import com.google.common.collect.Iterables; @Test(groups = "live") public class CloudFilesClientLiveTest extends CommonSwiftClientLiveTest { - public CloudFilesClientLiveTest(){ + public CloudFilesClientLiveTest() { provider = "cloudfiles"; } diff --git a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobIntegrationLiveTest.java b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobIntegrationLiveTest.java index 3d7f42b3a1..607734713d 100644 --- a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobIntegrationLiveTest.java +++ b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesBlobIntegrationLiveTest.java @@ -31,7 +31,7 @@ import static org.testng.Assert.assertEquals; */ @Test(groups = "live") public class CloudFilesBlobIntegrationLiveTest extends SwiftBlobIntegrationLiveTest { - public CloudFilesBlobIntegrationLiveTest(){ + public CloudFilesBlobIntegrationLiveTest() { provider = "cloudfiles"; } diff --git a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesContainerIntegrationLiveTest.java b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesContainerIntegrationLiveTest.java index 998e19e46d..a413635af1 100644 --- a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesContainerIntegrationLiveTest.java +++ b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesContainerIntegrationLiveTest.java @@ -24,7 +24,7 @@ import org.testng.annotations.Test; */ @Test(groups = "live") public class CloudFilesContainerIntegrationLiveTest extends SwiftContainerIntegrationLiveTest { - public CloudFilesContainerIntegrationLiveTest(){ + public CloudFilesContainerIntegrationLiveTest() { provider = "cloudfiles"; } } diff --git a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesContainerLiveTest.java b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesContainerLiveTest.java index 02053128b0..a2b64ef33b 100644 --- a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesContainerLiveTest.java +++ b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesContainerLiveTest.java @@ -24,7 +24,7 @@ import org.testng.annotations.Test; */ @Test(groups = { "live" }) public class CloudFilesContainerLiveTest extends BaseContainerLiveTest { - public CloudFilesContainerLiveTest(){ + public CloudFilesContainerLiveTest() { provider = "cloudfiles"; } } diff --git a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesServiceIntegrationLiveTest.java b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesServiceIntegrationLiveTest.java index 193315e732..bb6ac65c32 100644 --- a/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesServiceIntegrationLiveTest.java +++ b/apis/cloudfiles/src/test/java/org/jclouds/cloudfiles/blobstore/integration/CloudFilesServiceIntegrationLiveTest.java @@ -24,7 +24,7 @@ import org.testng.annotations.Test; */ @Test(groups = "live") public class CloudFilesServiceIntegrationLiveTest extends SwiftServiceIntegrationLiveTest { - public CloudFilesServiceIntegrationLiveTest(){ + public CloudFilesServiceIntegrationLiveTest() { provider = "cloudfiles"; } } diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/compute/functions/CloudServersImageToImage.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/compute/functions/CloudServersImageToImage.java index b71c0fd0e0..5cc52bfd87 100644 --- a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/compute/functions/CloudServersImageToImage.java +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/compute/functions/CloudServersImageToImage.java @@ -40,7 +40,7 @@ public class CloudServersImageToImage implements Function toPortableImageStatus, Function imageToOs) { - this.toPortableImageStatus=toPortableImageStatus; + this.toPortableImageStatus = toPortableImageStatus; this.imageToOs = imageToOs; } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java index 891f5bce18..980efd9619 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/config/CloudStackComputeServiceContextModule.java @@ -261,7 +261,7 @@ public class CloudStackComputeServiceContextModule extends @Provides @Singleton - public Map optionsConverters(){ + public Map optionsConverters() { return ImmutableMap.of( NetworkType.ADVANCED, new AdvancedNetworkOptionsConverter(), NetworkType.BASIC, new BasicNetworkOptionsConverter()); diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/AdvancedNetworkOptionsConverter.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/AdvancedNetworkOptionsConverter.java index 23a97baf36..803a268d11 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/AdvancedNetworkOptionsConverter.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/strategy/AdvancedNetworkOptionsConverter.java @@ -48,7 +48,7 @@ public class AdvancedNetworkOptionsConverter implements OptionsConverter { } else if (templateOptions.getIpsToNetworks().isEmpty()) { checkArgument(!networks.isEmpty(), "please setup a network for zone: " + zoneId); Network defaultNetworkInZone = Iterables.getFirst(filter(networks.values(), and(defaultNetworkInZone(zoneId), supportsStaticNAT())), null); - if(defaultNetworkInZone == null) { + if (defaultNetworkInZone == null) { defaultNetworkInZone = Iterables.getFirst(filter(networks.values(), isIsolatedNetwork()), null); } if (defaultNetworkInZone == null) { diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/ZoneAndName.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/ZoneAndName.java index 43c6ae04ad..3426c9a760 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/ZoneAndName.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/ZoneAndName.java @@ -33,7 +33,7 @@ import com.google.common.collect.Iterables; */ public class ZoneAndName { - public static final Function NAME_FUNCTION = new Function(){ + public static final Function NAME_FUNCTION = new Function() { @Override public String apply(ZoneAndName input) { @@ -42,7 +42,7 @@ public class ZoneAndName { }; - public static final Function ZONE_FUNCTION = new Function(){ + public static final Function ZONE_FUNCTION = new Function() { @Override public String apply(ZoneAndName input) { diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingApi.java index e8849fad5b..2188d7a1d6 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingApi.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/GlobalOfferingApi.java @@ -171,7 +171,7 @@ public interface GlobalOfferingApi extends OfferingApi { */ @Named("updateNetworkOffering") @GET - @QueryParams(keys = "command", values ="updateNetworkOffering") + @QueryParams(keys = "command", values = "updateNetworkOffering") @SelectJson("networkoffering") @Consumes(MediaType.APPLICATION_JSON) @Fallback(NullOnNotFoundOr404.class) diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerApi.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerApi.java index 85d1f321a4..0b4e89a0cc 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerApi.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/features/LoadBalancerApi.java @@ -124,7 +124,7 @@ public interface LoadBalancerApi { */ @Named("updateLoadBalancerRule") @GET - @QueryParams(keys = "command", values ="updateLoadBalancerRule") + @QueryParams(keys = "command", values = "updateLoadBalancerRule") @SelectJson("loadbalancerrule") @OnlyElement @Consumes(MediaType.APPLICATION_JSON) diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVlanIPRangeOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVlanIPRangeOptions.java index 397b3161fd..bf65aae3d7 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVlanIPRangeOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/CreateVlanIPRangeOptions.java @@ -84,17 +84,17 @@ public class CreateVlanIPRangeOptions extends AccountInDomainOptions { } public CreateVlanIPRangeOptions forVirtualNetwork(boolean forVirtualNetwork) { - this.queryParameters.replaceValues("forvirtualnetwork", ImmutableSet.of(forVirtualNetwork+"")); + this.queryParameters.replaceValues("forvirtualnetwork", ImmutableSet.of(forVirtualNetwork + "")); return this; } public CreateVlanIPRangeOptions zoneId(String zoneId) { - this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId+"")); + this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + "")); return this; } public CreateVlanIPRangeOptions vlan(long vlan) { - this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan+"")); + this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan + "")); return this; } @@ -104,7 +104,7 @@ public class CreateVlanIPRangeOptions extends AccountInDomainOptions { } public CreateVlanIPRangeOptions podId(String podId) { - this.queryParameters.replaceValues("podid", ImmutableSet.of(podId+"")); + this.queryParameters.replaceValues("podid", ImmutableSet.of(podId + "")); return this; } @@ -119,12 +119,12 @@ public class CreateVlanIPRangeOptions extends AccountInDomainOptions { } public CreateVlanIPRangeOptions networkId(String networkId) { - this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId+"")); + this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId + "")); return this; } public CreateVlanIPRangeOptions projectId(String projectId) { - this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId+"")); + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); return this; } } diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVlanIPRangesOptions.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVlanIPRangesOptions.java index 11b5d8b153..1c090d5534 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVlanIPRangesOptions.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/options/ListVlanIPRangesOptions.java @@ -64,7 +64,7 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions { } public static ListVlanIPRangesOptions vlan(String vlan) { - return new ListVlanIPRangesOptions().vlan(vlan+""); + return new ListVlanIPRangesOptions().vlan(vlan + ""); } public static ListVlanIPRangesOptions zoneId(String zoneId) { @@ -83,12 +83,12 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions { } public ListVlanIPRangesOptions forVirtualNetwork(boolean forVirtualNetwork) { - this.queryParameters.replaceValues("forvirtualnetwork", ImmutableSet.of(forVirtualNetwork+"")); + this.queryParameters.replaceValues("forvirtualnetwork", ImmutableSet.of(forVirtualNetwork + "")); return this; } public ListVlanIPRangesOptions id(String id) { - this.queryParameters.replaceValues("id", ImmutableSet.of(id+"")); + this.queryParameters.replaceValues("id", ImmutableSet.of(id + "")); return this; } @@ -98,17 +98,17 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions { } public ListVlanIPRangesOptions networkId(String networkId) { - this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId+"")); + this.queryParameters.replaceValues("networkid", ImmutableSet.of(networkId + "")); return this; } public ListVlanIPRangesOptions podId(String podId) { - this.queryParameters.replaceValues("podid", ImmutableSet.of(podId+"")); + this.queryParameters.replaceValues("podid", ImmutableSet.of(podId + "")); return this; } public ListVlanIPRangesOptions projectId(String projectId) { - this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId+"")); + this.queryParameters.replaceValues("projectid", ImmutableSet.of(projectId + "")); return this; } @@ -118,12 +118,12 @@ public class ListVlanIPRangesOptions extends AccountInDomainOptions { } public ListVlanIPRangesOptions vlan(long vlan) { - this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan+"")); + this.queryParameters.replaceValues("vlan", ImmutableSet.of(vlan + "")); return this; } public ListVlanIPRangesOptions zoneId(String zoneId) { - this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId+"")); + this.queryParameters.replaceValues("zoneid", ImmutableSet.of(zoneId + "")); return this; } } diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/strategy/OptionsConverterTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/strategy/OptionsConverterTest.java index 59162bff4e..47006ed8f6 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/strategy/OptionsConverterTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/compute/strategy/OptionsConverterTest.java @@ -60,7 +60,7 @@ public class OptionsConverterTest { try { converter.apply(optionsIn, EMPTY_NETWORKS_MAP, ZONE_ID, DeployVirtualMachineOptions.NONE); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { exceptionThrown = true; } @@ -95,7 +95,7 @@ public class OptionsConverterTest { boolean exceptionThrown = false; try { converter.apply(CloudStackTemplateOptions.NONE, EMPTY_NETWORKS_MAP, ZONE_ID, DeployVirtualMachineOptions.NONE); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { exceptionThrown = true; } assertTrue(exceptionThrown); @@ -111,7 +111,7 @@ public class OptionsConverterTest { boolean exceptionThrown = false; try { converter.apply(CloudStackTemplateOptions.NONE, ImmutableMap.of(unsuitableNetwork.getId(), unsuitableNetwork), ZONE_ID, DeployVirtualMachineOptions.NONE); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { exceptionThrown = true; } assertTrue(exceptionThrown); diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/FirewallApiLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/FirewallApiLiveTest.java index 8defd8519a..981b03ee8c 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/FirewallApiLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/FirewallApiLiveTest.java @@ -147,7 +147,7 @@ public class FirewallApiLiveTest extends BaseCloudStackApiLiveTest { assert rules != null; assertTrue(rules.size() > 0); - for(FirewallRule rule : rules) { + for (FirewallRule rule : rules) { checkFirewallRule(rule); } } @@ -176,7 +176,7 @@ public class FirewallApiLiveTest extends BaseCloudStackApiLiveTest { assert rules != null; assertTrue(rules.size() > 0); - for(FirewallRule rule : rules) { + for (FirewallRule rule : rules) { checkEgressFirewallRule(rule); } } diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalHostApiLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalHostApiLiveTest.java index a013ad0c9b..971e8a54ed 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalHostApiLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalHostApiLiveTest.java @@ -45,7 +45,7 @@ public class GlobalHostApiLiveTest extends BaseCloudStackApiLiveTest { Set hosts = globalAdminClient.getHostClient().listHosts(); assert hosts.size() > 0 : hosts; - for(Host host : hosts) { + for (Host host : hosts) { checkHost(host); } } @@ -72,7 +72,7 @@ public class GlobalHostApiLiveTest extends BaseCloudStackApiLiveTest { Set clusters = globalAdminClient.getHostClient().listClusters(); assert clusters.size() > 0 : clusters; - for(Cluster cluster : clusters) { + for (Cluster cluster : clusters) { checkCluster(cluster); } } diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolApiLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolApiLiveTest.java index e5ec3a9048..3c7d6d4b1e 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolApiLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/GlobalStoragePoolApiLiveTest.java @@ -44,7 +44,7 @@ public class GlobalStoragePoolApiLiveTest extends BaseCloudStackApiLiveTest { Set result = globalAdminClient.getStoragePoolClient().listStoragePools(); assertNotNull(result); assertTrue(result.size() > 0); - for(StoragePool pool : result) { + for (StoragePool pool : result) { assertNotNull(pool.getId()); assertFalse(Strings.isNullOrEmpty(pool.getName())); assertFalse(Strings.isNullOrEmpty(pool.getPath())); diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/ISOApiLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/ISOApiLiveTest.java index 5e2115f118..79d8181785 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/ISOApiLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/ISOApiLiveTest.java @@ -80,7 +80,7 @@ public class ISOApiLiveTest extends BaseCloudStackApiLiveTest { public void testRegisterISO() throws Exception { Optional guestOSTypeOptional = Iterables.tryFind(client.getGuestOSApi().listOSTypes(), Predicates.notNull()); Optional zoneOptional = Iterables.tryFind(client.getZoneApi().listZones(available(true)), Predicates.notNull()); - if(guestOSTypeOptional.isPresent() && zoneOptional.isPresent()) { + if (guestOSTypeOptional.isPresent() && zoneOptional.isPresent()) { String osTypeId = guestOSTypeOptional.get().getId(); String zoneId = zoneOptional.get().getId(); ISO iso = client.getISOApi().registerISO(isoName, "", url, zoneId, RegisterISOOptions.Builder.isPublic(true).osTypeId(osTypeId)); @@ -89,7 +89,7 @@ public class ISOApiLiveTest extends BaseCloudStackApiLiveTest { assertEquals(iso.getName(), isoName); } else { String skipMessage = String.format("Cannot register the iso with url: %s", url); - if(zoneOptional.isPresent()) + if (zoneOptional.isPresent()) skipMessage += " without a valid zone"; else skipMessage += " without a valid guest OS type"; diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/VirtualMachineApiLiveTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/VirtualMachineApiLiveTest.java index 8ae480df2c..98b46d3069 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/VirtualMachineApiLiveTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/VirtualMachineApiLiveTest.java @@ -200,14 +200,14 @@ public class VirtualMachineApiLiveTest extends BaseCloudStackApiLiveTest { Set allSafeNetworksInZone = adminClient.getNetworkApi().listNetworks( ListNetworksOptions.Builder.zoneId(template.getZoneId()).isSystem(false)); - for(Network net : allSafeNetworksInZone) { - if(net.getName().equals(prefix + "-ip-network")) { + for (Network net : allSafeNetworksInZone) { + if (net.getName().equals(prefix + "-ip-network")) { logger.info("Deleting VMs in network: " + net); Set machinesInNetwork = adminClient.getVirtualMachineApi().listVirtualMachines( ListVirtualMachinesOptions.Builder.networkId(net.getId())); - for(VirtualMachine machine : machinesInNetwork) { + for (VirtualMachine machine : machinesInNetwork) { if (machine.getState().equals(VirtualMachine.State.RUNNING)) { logger.info("Deleting VM: " + machine); destroyMachine(machine); @@ -252,7 +252,7 @@ public class VirtualMachineApiLiveTest extends BaseCloudStackApiLiveTest { logger.info("Created VM: " + vm); boolean hasStaticIpNic = false; - for(NIC nic : vm.getNICs()) { + for (NIC nic : vm.getNICs()) { if (nic.getNetworkId() == network.getId()) { hasStaticIpNic = true; assertEquals(nic.getIPAddress(), ipAddress); diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/predicates/VirtualMachineRunningTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/predicates/VirtualMachineRunningTest.java index 9abbb38abd..767c9093ee 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/predicates/VirtualMachineRunningTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/predicates/VirtualMachineRunningTest.java @@ -49,7 +49,7 @@ public class VirtualMachineRunningTest { @DataProvider(name = "virtualMachineStates") public Object[][] virtualMachineStates() { - return new Object[][]{ + return new Object[][] { {State.RUNNING, true}, {State.STARTING, false}, {State.STOPPING, false}, diff --git a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/binders/GetMetricStatisticsBinder.java b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/binders/GetMetricStatisticsBinder.java index d81d688ea1..af8a9f6d59 100644 --- a/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/binders/GetMetricStatisticsBinder.java +++ b/apis/cloudwatch/src/main/java/org/jclouds/cloudwatch/binders/GetMetricStatisticsBinder.java @@ -43,7 +43,7 @@ public class GetMetricStatisticsBinder implements org.jclouds.rest.Binder { private final DateService dateService; @Inject - protected GetMetricStatisticsBinder(DateService dateService){ + protected GetMetricStatisticsBinder(DateService dateService) { this.dateService = dateService; } diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java index 81136dd707..8d544a36ff 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java @@ -64,7 +64,7 @@ public final class EC2ApiMetadata extends BaseHttpApiMetadata { return properties; } - public final static class Builder extends BaseHttpApiMetadata.Builder { + public static final class Builder extends BaseHttpApiMetadata.Builder { public Builder() { id("ec2") .name("Amazon Elastic Compute Cloud (EC2) API") diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/EC2ComputeService.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/EC2ComputeService.java index 0f4896c152..7bfa4bd793 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/EC2ComputeService.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/EC2ComputeService.java @@ -287,7 +287,7 @@ public class EC2ComputeService extends BaseComputeService { } } - protected void cleanUpIncidentalResources(final String region, final String group){ + protected void cleanUpIncidentalResources(final String region, final String group) { // For issue #445, tries to delete security groups first: ec2 throws exception if in use, but // deleting a key pair does not. // This is "belt-and-braces" because deleteKeyPair also does extractIdsFromInstances & usingKeyPairAndNotDead diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceContextModule.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceContextModule.java index 2a1b495f03..a57e527416 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceContextModule.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/config/EC2ComputeServiceContextModule.java @@ -68,7 +68,7 @@ public class EC2ComputeServiceContextModule extends BaseComputeServiceContextMod super.configure(); } - protected void installDependencies(){ + protected void installDependencies() { install(new EC2ComputeServiceDependenciesModule()); } diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/PresentInstances.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/PresentInstances.java index 4f0d4f0880..f74000f8d3 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/PresentInstances.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/functions/PresentInstances.java @@ -78,7 +78,7 @@ public class PresentInstances implements Function, Set { } @Override - public Image load(RegionAndName key) throws ExecutionException{ + public Image load(RegionAndName key) throws ExecutionException { try { org.jclouds.ec2.domain.Image image = Iterables.getOnlyElement(sync.getAMIApi().get() .describeImagesInRegion(key.getRegion(), imageIds(key.getName()))); diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/AvailabilityZoneInfo.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/AvailabilityZoneInfo.java index 5cd498d06d..63c993fe8c 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/AvailabilityZoneInfo.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/AvailabilityZoneInfo.java @@ -29,7 +29,7 @@ import com.google.common.collect.Sets; * /> * @author Adrian Cole */ -public class AvailabilityZoneInfo implements Comparable{ +public class AvailabilityZoneInfo implements Comparable { private final String zone; private final String state; diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/BlockDeviceMapping.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/BlockDeviceMapping.java index 8ad40d0f57..47bb456c44 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/BlockDeviceMapping.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/BlockDeviceMapping.java @@ -26,7 +26,7 @@ import org.jclouds.javax.annotation.Nullable; * * @author Lili Nadar */ -public class BlockDeviceMapping implements Comparable{ +public class BlockDeviceMapping implements Comparable { public static Builder builder() { return new Builder(); } diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/Reservation.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Reservation.java index 39e18740e4..85db98eb49 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/Reservation.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Reservation.java @@ -35,7 +35,7 @@ import com.google.common.collect.Ordering; * /> * @author Adrian Cole */ -public class Reservation extends ForwardingSet implements Comparable>{ +public class Reservation extends ForwardingSet implements Comparable> { public static Builder builder() { return new Builder(); diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/ReservedInstancesOffering.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/ReservedInstancesOffering.java index 2ef4d54a07..779fe9c34a 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/ReservedInstancesOffering.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/ReservedInstancesOffering.java @@ -34,7 +34,7 @@ public class ReservedInstancesOffering implements Comparable> instanceToCredentials = createMock(LoadingCache.class); LoadingCache elasticIpCache = createMock(LoadingCache.class); - GetNodeMetadataStrategy nodeRunning = new GetNodeMetadataStrategy(){ + GetNodeMetadataStrategy nodeRunning = new GetNodeMetadataStrategy() { @Override public NodeMetadata getNode(String input) { diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/features/BaseEC2ApiTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/features/BaseEC2ApiTest.java index 190806c6c3..cff45124a4 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/features/BaseEC2ApiTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/features/BaseEC2ApiTest.java @@ -68,7 +68,7 @@ public abstract class BaseEC2ApiTest extends BaseAsyncApiTest { @Provides @Singleton - LoadingCache provide(){ + LoadingCache provide() { return CacheBuilder.newBuilder().build(new CacheLoader() { @Override diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/internal/BaseEC2ExpectTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/internal/BaseEC2ExpectTest.java index 5f05d3936c..993bc34db0 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/internal/BaseEC2ExpectTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/internal/BaseEC2ExpectTest.java @@ -65,7 +65,7 @@ public abstract class BaseEC2ExpectTest extends BaseRestClientExpectTest { .addFormParam("Action", "DescribeRegions").build()); Builder builder = ImmutableMap. builder(); - for (String region : ImmutableSet.of("ap-northeast-1", "ap-southeast-1", "eu-west-1", "sa-east-1", "us-east-1", "us-west-1", "us-west-2")){ + for (String region : ImmutableSet.of("ap-northeast-1", "ap-southeast-1", "eu-west-1", "sa-east-1", "us-east-1", "us-west-1", "us-west-2")) { builder.put( formSigner.filter(HttpRequest.builder() .method("POST") diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/predicates/VolumeDetachedTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/predicates/VolumeDetachedTest.java index 3d3d70f1d6..b5008ad828 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/predicates/VolumeDetachedTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/predicates/VolumeDetachedTest.java @@ -65,7 +65,7 @@ public class VolumeDetachedTest { @DataProvider(name = "notDetachedStatuses") public Object[][] provideNotDetachedStatuses() { - return new Object[][]{ + return new Object[][] { {Status.ATTACHED}, {Status.ATTACHING}, {Status.BUSY}, diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorTest.java index b810e20e2c..bd7dc745da 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemBlobKeyValidatorTest.java @@ -47,17 +47,17 @@ public class FilesystemBlobKeyValidatorTest { try { validator.validate(""); fail("Blob key value incorrect, but was not recognized"); - } catch(IllegalArgumentException e) {} + } catch (IllegalArgumentException e) {} try { validator.validate(File.separator + "is" + File.separator + "" + "ok"); fail("Blob key value incorrect, but was not recognized"); - } catch(IllegalArgumentException e) {} + } catch (IllegalArgumentException e) {} try { validator.validate("all" + File.separator + "is" + File.separator); fail("Blob key value incorrect, but was not recognized"); - } catch(IllegalArgumentException e) {} + } catch (IllegalArgumentException e) {} } diff --git a/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorTest.java b/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorTest.java index 8e0c20b899..c3af4ce6d0 100644 --- a/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorTest.java +++ b/apis/filesystem/src/test/java/org/jclouds/filesystem/predicates/validators/internal/FilesystemContainerNameValidatorTest.java @@ -47,22 +47,22 @@ public class FilesystemContainerNameValidatorTest { try { validator.validate(""); fail("Container name value incorrect, but was not recognized"); - } catch(IllegalArgumentException e) {} + } catch (IllegalArgumentException e) {} try { validator.validate(null); fail("Container name value incorrect, but was not recognized"); - } catch(IllegalArgumentException e) {} + } catch (IllegalArgumentException e) {} try { validator.validate(File.separator + "is" + File.separator + "" + "ok"); fail("Container name value incorrect, but was not recognized"); - } catch(IllegalArgumentException e) {} + } catch (IllegalArgumentException e) {} try { validator.validate("all" + File.separator + "is" + File.separator); fail("Container name value incorrect, but was not recognized"); - } catch(IllegalArgumentException e) {} + } catch (IllegalArgumentException e) {} } diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiExpectTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiExpectTest.java index 5f8332fa35..51e61e44b3 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiExpectTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TenantApiExpectTest.java @@ -43,7 +43,7 @@ import com.google.common.collect.ImmutableSet; @Test(testName = "TenantApiExpectTest") public class TenantApiExpectTest extends BaseKeystoneRestApiExpectTest { - public TenantApiExpectTest(){ + public TenantApiExpectTest() { endpoint = "https://csnode.jclouds.org:35357"; } diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TokenApiExpectTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TokenApiExpectTest.java index 3e48df4071..7924677e33 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TokenApiExpectTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/TokenApiExpectTest.java @@ -50,7 +50,7 @@ import com.google.common.collect.ImmutableSet; @Test(testName = "TokenApiExpectTest") public class TokenApiExpectTest extends BaseKeystoneRestApiExpectTest { - public TokenApiExpectTest(){ + public TokenApiExpectTest() { endpoint = "https://csnode.jclouds.org:35357"; } diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/UserApiExpectTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/UserApiExpectTest.java index 2669611247..23dd3ee082 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/UserApiExpectTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/features/UserApiExpectTest.java @@ -46,7 +46,7 @@ import com.google.common.collect.ImmutableSet; @Test(singleThreaded = true, testName = "UserApiExpectTest") public class UserApiExpectTest extends BaseKeystoneRestApiExpectTest { - public UserApiExpectTest(){ + public UserApiExpectTest() { endpoint = "https://csnode.jclouds.org:35357"; } diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/internal/KeystoneFixture.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/internal/KeystoneFixture.java index 6a3d138674..b00f232df1 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/internal/KeystoneFixture.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/internal/KeystoneFixture.java @@ -36,15 +36,15 @@ import com.google.common.net.HttpHeaders; public enum KeystoneFixture { INSTANCE; - public String getTenantId(){ + public String getTenantId() { return "12346637803162"; } - public String getTenantName(){ + public String getTenantName() { return "adrian@jclouds.org"; } - public HttpRequest initialAuthWithUsernameAndPassword(String username, String password){ + public HttpRequest initialAuthWithUsernameAndPassword(String username, String password) { return HttpRequest.builder().method("POST") .endpoint("http://localhost:5000/v2.0/tokens") .addHeader(HttpHeaders.ACCEPT, "application/json") @@ -55,7 +55,7 @@ public enum KeystoneFixture { username, password), "application/json")).build(); } - public HttpRequest initialAuthWithUsernameAndPasswordAndTenantName(String username, String password){ + public HttpRequest initialAuthWithUsernameAndPasswordAndTenantName(String username, String password) { return HttpRequest.builder().method("POST") .endpoint("http://localhost:5000/v2.0/tokens") .addHeader(HttpHeaders.ACCEPT, "application/json") @@ -66,7 +66,7 @@ public enum KeystoneFixture { username, password, getTenantName()), "application/json")).build(); } - public HttpRequest initialAuthWithAccessKeyAndSecretKeyAndTenantName(String accessKey, String secretKey){ + public HttpRequest initialAuthWithAccessKeyAndSecretKeyAndTenantName(String accessKey, String secretKey) { return HttpRequest.builder().method("POST") .endpoint("http://localhost:5000/v2.0/tokens") .addHeader(HttpHeaders.ACCEPT, "application/json") @@ -77,7 +77,7 @@ public enum KeystoneFixture { accessKey, secretKey, getTenantName()), "application/json")).build(); } - public HttpRequest initialAuthWithAccessKeyAndSecretKeyAndTenantId(String accessKey, String secretKey){ + public HttpRequest initialAuthWithAccessKeyAndSecretKeyAndTenantId(String accessKey, String secretKey) { return HttpRequest.builder().method("POST") .endpoint("http://localhost:5000/v2.0/tokens") @@ -89,11 +89,11 @@ public enum KeystoneFixture { accessKey, secretKey, getTenantId()), "application/json")).build(); } - public String getAuthToken(){ + public String getAuthToken() { return "Auth_4f173437e4b013bee56d1007"; } - public HttpResponse responseWithAccess(){ + public HttpResponse responseWithAccess() { return HttpResponse.builder().statusCode(200).message("HTTP/1.1 200").payload( payloadFromResourceWithContentType("/keystoneAuthResponse.json", "application/json")).build(); } diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/suppliers/LocationIdToURIFromAccessForTypeAndVersionTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/suppliers/LocationIdToURIFromAccessForTypeAndVersionTest.java index fa00e79109..0da602e7cf 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/suppliers/LocationIdToURIFromAccessForTypeAndVersionTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/suppliers/LocationIdToURIFromAccessForTypeAndVersionTest.java @@ -53,7 +53,7 @@ public class LocationIdToURIFromAccessForTypeAndVersionTest { @Override protected void configure() { bindConstant().annotatedWith(Provider.class).to("openstack-keystone"); - bind(new TypeLiteral>(){ + bind(new TypeLiteral>() { }).annotatedWith(Provider.class).toInstance(Suppliers.ofInstance(URI.create("https://identity"))); bind(new TypeLiteral>(){}).to(EndpointToRegion.class); install(new FactoryModuleBuilder().implement(LocationIdToURIFromAccessForTypeAndVersion.class, diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/suppliers/RegionIdToURIFromAccessForTypeAndVersionTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/suppliers/RegionIdToURIFromAccessForTypeAndVersionTest.java index 51f53e9003..d3941fec5c 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/suppliers/RegionIdToURIFromAccessForTypeAndVersionTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/suppliers/RegionIdToURIFromAccessForTypeAndVersionTest.java @@ -50,7 +50,7 @@ public class RegionIdToURIFromAccessForTypeAndVersionTest { @Override protected void configure() { bindConstant().annotatedWith(Provider.class).to("openstack-keystone"); - bind(new TypeLiteral>(){ + bind(new TypeLiteral>() { }).annotatedWith(Provider.class).toInstance(Suppliers.ofInstance(URI.create("https://identity"))); install(new FactoryModuleBuilder().implement(RegionIdToURISupplier.class, RegionIdToURIFromAccessForTypeAndVersion.class).build( diff --git a/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/NovaEC2ApiMetadata.java b/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/NovaEC2ApiMetadata.java index a6f1ab0c44..1180fcf398 100644 --- a/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/NovaEC2ApiMetadata.java +++ b/apis/openstack-nova-ec2/src/main/java/org/jclouds/openstack/nova/ec2/NovaEC2ApiMetadata.java @@ -69,7 +69,7 @@ public final class NovaEC2ApiMetadata extends BaseHttpApiMetadata { return properties; } - public final static class Builder extends BaseHttpApiMetadata.Builder { + public static final class Builder extends BaseHttpApiMetadata.Builder { public Builder() { id("openstack-nova-ec2") .name("OpenStack Nova's EC2-clone API") diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/zonescoped/ZoneAndName.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/zonescoped/ZoneAndName.java index d33ce7342d..fdb49e1b12 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/zonescoped/ZoneAndName.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/zonescoped/ZoneAndName.java @@ -33,7 +33,7 @@ import com.google.common.collect.Iterables; */ public class ZoneAndName { - public static final Function NAME_FUNCTION = new Function(){ + public static final Function NAME_FUNCTION = new Function() { @Override public String apply(ZoneAndName input) { @@ -42,7 +42,7 @@ public class ZoneAndName { }; - public static final Function ZONE_FUNCTION = new Function(){ + public static final Function ZONE_FUNCTION = new Function() { @Override public String apply(ZoneAndName input) { diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/functions/ImageInZoneToImageTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/functions/ImageInZoneToImageTest.java index 3c35b9f7a5..dfc15f47d4 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/functions/ImageInZoneToImageTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/functions/ImageInZoneToImageTest.java @@ -89,7 +89,7 @@ public class ImageInZoneToImageTest { } @SuppressWarnings("unchecked") - private static Function constant(OperatingSystem operatingSystem){ + private static Function constant(OperatingSystem operatingSystem) { return Function.class.cast(Functions.constant(operatingSystem)); } } diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/loaders/FindSecurityGroupOrCreateTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/loaders/FindSecurityGroupOrCreateTest.java index 8a22baa57e..62f45fd4a4 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/loaders/FindSecurityGroupOrCreateTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/compute/loaders/FindSecurityGroupOrCreateTest.java @@ -63,7 +63,7 @@ public class FindSecurityGroupOrCreateTest { public void testWhenFoundReturnsSecurityGroupFromAtomicReferenceValueUpdatedDuringPredicateCheck() throws Exception { final SecurityGroupInZone securityGroupInZone = createMock(SecurityGroupInZone.class); - Predicate> returnSecurityGroupExistsInZone = new Predicate>(){ + Predicate> returnSecurityGroupExistsInZone = new Predicate>() { @Override public boolean apply(AtomicReference input) { diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsApiLiveTest.java index 9795834292..d95832433f 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/FlavorExtraSpecsApiLiveTest.java @@ -61,7 +61,7 @@ public class FlavorExtraSpecsApiLiveTest extends BaseNovaApiLiveTest { @Override protected void tearDown() { if (apiOption.isPresent() && testFlavor != null) { - for(String key : testSpecs.keySet()) { + for (String key : testSpecs.keySet()) { assertTrue(apiOption.get().deleteMetadataKey(testFlavor.getId(), key)); } } diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/functions/CreateSecurityGroupIfNeededTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/functions/CreateSecurityGroupIfNeededTest.java index aa2beaf4a7..ba4be4df6a 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/functions/CreateSecurityGroupIfNeededTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/functions/CreateSecurityGroupIfNeededTest.java @@ -69,7 +69,7 @@ public class CreateSecurityGroupIfNeededTest extends BaseNovaApiExpectTest { int ruleId = 10331; - for (int port : ImmutableList.of(22,8080)){ + for (int port : ImmutableList.of(22,8080)) { HttpRequest createCidrRule = HttpRequest.builder().method("POST").endpoint( URI.create("https://az-1.region-a.geo-1.compute.hpcloudsvc.com/v1.1/3456/os-security-group-rules")).headers( diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/handlers/NovaErrorHandlerTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/handlers/NovaErrorHandlerTest.java index d3b6d75f6d..fe302a7b28 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/handlers/NovaErrorHandlerTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/handlers/NovaErrorHandlerTest.java @@ -49,7 +49,7 @@ public class NovaErrorHandlerTest { private HttpCommand command; @BeforeTest - void setupCommand(){ + void setupCommand() { command = command(); } @@ -206,7 +206,7 @@ public class NovaErrorHandlerTest { DateCodec iso8601Seconds = new DateServiceIso8601SecondsCodec(new SimpleDateFormatDateService()); - Ticker y2k = new Ticker(){ + Ticker y2k = new Ticker() { @Override public long read() { diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/internal/BaseNovaApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/internal/BaseNovaApiLiveTest.java index d3ac42d9cf..da1847bbe2 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/internal/BaseNovaApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/internal/BaseNovaApiLiveTest.java @@ -59,9 +59,9 @@ public class BaseNovaApiLiveTest extends BaseApiLiveTest { public void setup() { super.setup(); zones = api.getConfiguredZones(); - for (String zone : zones){ + for (String zone : zones) { ServerApi serverApi = api.getServerApiForZone(zone); - for (Resource server : serverApi.list().concat()){ + for (Resource server : serverApi.list().concat()) { if (server.getName().equals(hostName)) serverApi.delete(server.getId()); } diff --git a/apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/CloudIdentityApiMetadata.java b/apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/CloudIdentityApiMetadata.java index 9abd61440b..2eb439c337 100644 --- a/apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/CloudIdentityApiMetadata.java +++ b/apis/rackspace-cloudidentity/src/main/java/org/jclouds/rackspace/cloudidentity/v2_0/CloudIdentityApiMetadata.java @@ -75,7 +75,7 @@ public class CloudIdentityApiMetadata extends KeystoneApiMetadata { public static class Builder extends KeystoneApiMetadata.Builder { @SuppressWarnings("deprecation") - protected Builder(){ + protected Builder() { super(KeystoneApi.class, KeystoneAsyncApi.class); id("rackspace-cloudidentity") .name("Rackspace Cloud Identity Service") diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/functions/ParseNodes.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/functions/ParseNodes.java index 9581d94612..f750d9b256 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/functions/ParseNodes.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/functions/ParseNodes.java @@ -77,9 +77,9 @@ public class ParseNodes extends ParseJson { public ToPagedIterable setContext(HttpRequest request) { String path = request.getEndpoint().getPath(); int lastSlash = path.lastIndexOf('/'); - int secondLastSlash = path.lastIndexOf('/', lastSlash-1); + int secondLastSlash = path.lastIndexOf('/', lastSlash - 1); - lbId = Integer.valueOf(path.substring(secondLastSlash+1, lastSlash)); + lbId = Integer.valueOf(path.substring(secondLastSlash + 1, lastSlash)); return super.setContext(request); } diff --git a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java index 281d97a489..be6f72b2d7 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java @@ -98,7 +98,7 @@ public class S3ApiMetadata extends BaseRestApiMetadata { this(S3Client.class, S3AsyncClient.class); } - protected Builder(Class syncClient, Class asyncClient){ + protected Builder(Class syncClient, Class asyncClient) { super(syncClient, asyncClient); id("s3") .name("Amazon Simple Storage Service (S3) API") diff --git a/apis/s3/src/main/java/org/jclouds/s3/filters/RequestAuthorizeSignature.java b/apis/s3/src/main/java/org/jclouds/s3/filters/RequestAuthorizeSignature.java index 26e06b03de..050d40c629 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/filters/RequestAuthorizeSignature.java +++ b/apis/s3/src/main/java/org/jclouds/s3/filters/RequestAuthorizeSignature.java @@ -233,7 +233,7 @@ public class RequestAuthorizeSignature implements HttpRequestFilter, RequestSign // the only S3 implementation configured to allow uppercase payload/bucket/container names. // // http://code.google.com/p/jclouds/issues/detail?id=992 - if (isVhostStyle && bucketName!= null && bucketName.equals(bucketName.toLowerCase())) + if (isVhostStyle && bucketName != null && bucketName.equals(bucketName.toLowerCase())) toSign.append(servicePath).append(bucketName); } diff --git a/apis/sts/src/main/java/org/jclouds/aws/config/AWSHttpApiModule.java b/apis/sts/src/main/java/org/jclouds/aws/config/AWSHttpApiModule.java index a509461a8e..d836955dac 100644 --- a/apis/sts/src/main/java/org/jclouds/aws/config/AWSHttpApiModule.java +++ b/apis/sts/src/main/java/org/jclouds/aws/config/AWSHttpApiModule.java @@ -53,14 +53,14 @@ public abstract class AWSHttpApiModule extends HttpApiModule { @Provides @ClientError @Singleton - protected Set provideRetryableCodes(){ + protected Set provideRetryableCodes() { return ImmutableSet.of("RequestTimeout", "OperationAborted", "SignatureDoesNotMatch"); } @Provides @ServerError @Singleton - protected Set provideRetryableServerCodes(){ + protected Set provideRetryableServerCodes() { return ImmutableSet.of("RequestLimitExceeded"); } diff --git a/apis/sts/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java b/apis/sts/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java index 05358a4ad4..6d74408cb8 100644 --- a/apis/sts/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java +++ b/apis/sts/src/main/java/org/jclouds/aws/config/AWSRestClientModule.java @@ -68,14 +68,14 @@ public abstract class AWSRestClientModule extends RestClientModule { @Provides @ClientError @Singleton - protected Set provideRetryableCodes(){ + protected Set provideRetryableCodes() { return ImmutableSet.of("RequestTimeout", "OperationAborted", "SignatureDoesNotMatch"); } @Provides @ServerError @Singleton - protected Set provideRetryableServerCodes(){ + protected Set provideRetryableServerCodes() { return ImmutableSet.of("RequestLimitExceeded"); } diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java index 950362d8c3..9ac73c7486 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/CommonSwiftAsyncClient.java @@ -267,7 +267,7 @@ public interface CommonSwiftAsyncClient extends Closeable { @PUT @Path("/{container}/{name}") @ResponseParser(ParseETagHeader.class) - @Headers(keys = "X-Object-Manifest", values="{container}/{name}/") + @Headers(keys = "X-Object-Manifest", values = "{container}/{name}/") ListenableFuture putObjectManifest(@PathParam("container") String container, @PathParam("name") String name); } diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java index ef915ddcb5..76374ac7fb 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftApiMetadata.java @@ -82,7 +82,7 @@ public class SwiftApiMetadata extends BaseRestApiMetadata { this(SwiftClient.class, SwiftAsyncClient.class); } - protected Builder(Class syncClient, Class asyncClient){ + protected Builder(Class syncClient, Class asyncClient) { super(syncClient, asyncClient); id("swift") .name("OpenStack Swift with SwiftAuth") diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/handlers/ParseSwiftErrorFromHttpResponse.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/handlers/ParseSwiftErrorFromHttpResponse.java index f59a25c576..52e224a9bf 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/handlers/ParseSwiftErrorFromHttpResponse.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/handlers/ParseSwiftErrorFromHttpResponse.java @@ -66,7 +66,7 @@ public class ParseSwiftErrorFromHttpResponse implements HttpErrorHandler { if (sourcePath != null) { String path = command.getCurrentRequest().getEndpoint().getPath(); - int startOfDestinationPath = path.lastIndexOf("/", path.lastIndexOf("/")-1); + int startOfDestinationPath = path.lastIndexOf("/", path.lastIndexOf("/") - 1); String destinationPath = path.substring(startOfDestinationPath); exception = new CopyObjectException(sourcePath, destinationPath, message); diff --git a/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftClientLiveTest.java b/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftClientLiveTest.java index 5198e53ac4..5ece98ec8a 100644 --- a/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftClientLiveTest.java +++ b/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftClientLiveTest.java @@ -25,7 +25,7 @@ import org.testng.annotations.Test; @Test(groups = "live", testName = "SwiftClientLiveTest") public class SwiftClientLiveTest extends CommonSwiftClientLiveTest { - public SwiftClientLiveTest(){ + public SwiftClientLiveTest() { provider = System.getProperty("test.swift.provider", "swift"); } diff --git a/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftKeystoneClientLiveTest.java b/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftKeystoneClientLiveTest.java index 139eaadae4..634e09267a 100644 --- a/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftKeystoneClientLiveTest.java +++ b/apis/swift/src/test/java/org/jclouds/openstack/swift/SwiftKeystoneClientLiveTest.java @@ -25,7 +25,7 @@ import org.testng.annotations.Test; @Test(groups = "live", testName = "SwiftKeystoneClientLiveTest") public class SwiftKeystoneClientLiveTest extends CommonSwiftClientLiveTest { - public SwiftKeystoneClientLiveTest(){ + public SwiftKeystoneClientLiveTest() { provider = System.getProperty("test.swift.provider", "swift-keystone"); } diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn.java index 4b2a3cfb06..77229acc88 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOn.java @@ -101,7 +101,7 @@ public class InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployA private DnsNameValidator validator; - ComputerNameValidator(){ + ComputerNameValidator() { this.validator = new DnsNameValidator(3, 15); } diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudComputeServiceAdapter.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudComputeServiceAdapter.java index 36381b44f4..377c8f9cda 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudComputeServiceAdapter.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/compute/strategy/VCloudComputeServiceAdapter.java @@ -105,13 +105,13 @@ public class VCloudComputeServiceAdapter implements ComputeServiceAdapter0) + if (ipRanges.size() > 0) helper.add("ipRanges", ipRanges); - if (allocatedIpAddresses.size() >0) + if (allocatedIpAddresses.size() > 0) helper.add("allocatedIpAddresses", allocatedIpAddresses); return helper.toString(); } diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java index d60fe0f130..ea4c38879b 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/domain/network/NatService.java @@ -108,7 +108,7 @@ public class NatService { public String toString() { ToStringHelper helper = Objects.toStringHelper("").omitNullValues().add("enabled", enabled) .add("type", type).add("policy", policy); - if (natRules.size() >0) + if (natRules.size() > 0) helper.add("natRules", natRules); return helper.toString(); } diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VAppTemplatesInOrg.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VAppTemplatesInOrg.java index 36607a8bbc..e7507d4f8a 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VAppTemplatesInOrg.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/functions/VAppTemplatesInOrg.java @@ -52,7 +52,7 @@ public class VAppTemplatesInOrg implements Function> public Iterable apply(Org from) { Iterable catalogs = allCatalogItemsInOrg.apply(from); Iterable vAppTemplates = vAppTemplatesForCatalogItems.apply(catalogs); - return filter(vAppTemplates, and(notNull(), new Predicate(){ + return filter(vAppTemplates, and(notNull(), new Predicate() { @Override public boolean apply(VAppTemplate input) { if (input == null) diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java index 341f5fcfad..37d1d035cd 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/options/InstantiateVAppTemplateOptions.java @@ -159,7 +159,7 @@ public class InstantiateVAppTemplateOptions { } @Override - public String toString(){ + public String toString() { return string().toString(); } diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOnExpectTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOnExpectTest.java index b2094a6a32..8ee0a2945c 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOnExpectTest.java +++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/compute/strategy/InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOnExpectTest.java @@ -47,7 +47,7 @@ public class InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployA String ns = "http://www.vmware.com/vcloud/v1"; Properties outputProperties; - public InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOnExpectTest(){ + public InstantiateVAppTemplateWithGroupEncodedIntoNameThenCustomizeDeployAndPowerOnExpectTest() { outputProperties = new Properties(); outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes"); } diff --git a/blobstore/src/test/java/org/jclouds/blobstore/functions/BlobToHttpGetOptionsTest.java b/blobstore/src/test/java/org/jclouds/blobstore/functions/BlobToHttpGetOptionsTest.java index 6f9eb7507a..da5ee5518c 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/functions/BlobToHttpGetOptionsTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/functions/BlobToHttpGetOptionsTest.java @@ -89,7 +89,7 @@ public class BlobToHttpGetOptionsTest { } @Test - public void testRanges(){ + public void testRanges() { org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions(); in.range(0,1024); in.startAt(2048); @@ -103,7 +103,7 @@ public class BlobToHttpGetOptionsTest { } @Test - public void testRangesTail(){ + public void testRangesTail() { org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions(); in.tail(1024); @@ -114,7 +114,7 @@ public class BlobToHttpGetOptionsTest { } @Test - public void testRangesStart(){ + public void testRangesStart() { org.jclouds.blobstore.options.GetOptions in = new org.jclouds.blobstore.options.GetOptions(); in.startAt(1024); diff --git a/common/openstack/src/main/java/org/jclouds/openstack/domain/Link.java b/common/openstack/src/main/java/org/jclouds/openstack/domain/Link.java index 4997aba491..e264a3697a 100644 --- a/common/openstack/src/main/java/org/jclouds/openstack/domain/Link.java +++ b/common/openstack/src/main/java/org/jclouds/openstack/domain/Link.java @@ -124,7 +124,7 @@ public class Link { return this; } - public Link build(){ + public Link build() { return new Link(relation, type, href); } diff --git a/compute/src/main/java/org/jclouds/compute/callables/BlockUntilInitScriptStatusIsZeroThenReturnOutput.java b/compute/src/main/java/org/jclouds/compute/callables/BlockUntilInitScriptStatusIsZeroThenReturnOutput.java index b4070d2592..8f767ad4a2 100644 --- a/compute/src/main/java/org/jclouds/compute/callables/BlockUntilInitScriptStatusIsZeroThenReturnOutput.java +++ b/compute/src/main/java/org/jclouds/compute/callables/BlockUntilInitScriptStatusIsZeroThenReturnOutput.java @@ -112,7 +112,7 @@ public class BlockUntilInitScriptStatusIsZeroThenReturnOutput extends AbstractFu */ static Predicate loopUntilTrueOrThrowCancellationException(Predicate predicate, long period, long maxPeriod, final AbstractFuture futureWhichMightBeCancelled) { - return retry(Predicates. and(predicate, new Predicate(){ + return retry(Predicates. and(predicate, new Predicate() { public boolean apply(String in) { if (futureWhichMightBeCancelled.isCancelled()) throw new CancellationException(futureWhichMightBeCancelled + " is cancelled"); diff --git a/compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java b/compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java index 7307196066..8cac5dcd53 100644 --- a/compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java +++ b/compute/src/main/java/org/jclouds/compute/config/BaseComputeServiceContextModule.java @@ -117,7 +117,7 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule { install(new FactoryModuleBuilder().build(BlockUntilInitScriptStatusIsZeroThenReturnOutput.Factory.class)); } - protected void bindCredentialsOverriderFunction(){ + protected void bindCredentialsOverriderFunction() { bind(new TypeLiteral>() { }).to(DefaultCredentialsFromImageOrOverridingCredentials.class); } @@ -303,13 +303,13 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule { @Provides @Singleton - protected Optional provideImageExtension(Injector i){ + protected Optional provideImageExtension(Injector i) { return Optional.absent(); } @Provides @Singleton - protected Optional provideSecurityGroupExtension(Injector i){ + protected Optional provideSecurityGroupExtension(Injector i) { return Optional.absent(); } diff --git a/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java b/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java index fec67ec945..58220902db 100644 --- a/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java +++ b/compute/src/main/java/org/jclouds/compute/domain/internal/TemplateBuilderImpl.java @@ -163,7 +163,7 @@ public class TemplateBuilderImpl implements TemplateBuilder { }; } - final Predicate locationPredicate = new NullEqualToIsParentOrIsGrandparentOfCurrentLocation(new Supplier(){ + final Predicate locationPredicate = new NullEqualToIsParentOrIsGrandparentOfCurrentLocation(new Supplier() { @Override public Location get() { @@ -1079,13 +1079,13 @@ public class TemplateBuilderImpl implements TemplateBuilder { toString.add("imageVersion", imageVersion); if (location != null) toString.add("locationId", location.getId()); - if (minCores >0) //TODO: make non-primitive + if (minCores > 0) //TODO: make non-primitive toString.add("minCores", minCores); - if (minRam >0) //TODO: make non-primitive + if (minRam > 0) //TODO: make non-primitive toString.add("minRam", minRam); - if (minRam >0) //TODO: make non-primitive + if (minRam > 0) //TODO: make non-primitive toString.add("minRam", minRam); - if (minDisk >0) //TODO: make non-primitive + if (minDisk > 0) //TODO: make non-primitive toString.add("minDisk", minDisk); toString.add("osFamily", osFamily); toString.add("osName", osName); diff --git a/compute/src/main/java/org/jclouds/compute/predicates/ImagePredicates.java b/compute/src/main/java/org/jclouds/compute/predicates/ImagePredicates.java index c6e95c5d2d..fea299c8f8 100644 --- a/compute/src/main/java/org/jclouds/compute/predicates/ImagePredicates.java +++ b/compute/src/main/java/org/jclouds/compute/predicates/ImagePredicates.java @@ -97,7 +97,7 @@ public class ImagePredicates { @Override public String toString() { - return "metadataContains(" + key +", "+value + ")"; + return "metadataContains(" + key + ", " + value + ")"; } }; } diff --git a/compute/src/main/java/org/jclouds/compute/stub/StubApiMetadata.java b/compute/src/main/java/org/jclouds/compute/stub/StubApiMetadata.java index 0fa139367c..813e99e37f 100644 --- a/compute/src/main/java/org/jclouds/compute/stub/StubApiMetadata.java +++ b/compute/src/main/java/org/jclouds/compute/stub/StubApiMetadata.java @@ -44,7 +44,7 @@ public class StubApiMetadata extends BaseApiMetadata { public static class Builder extends BaseApiMetadata.Builder { - protected Builder(){ + protected Builder() { id("stub") .name("in-memory (Stub) API") .identityName("Unused") diff --git a/compute/src/main/java/org/jclouds/ovf/Disk.java b/compute/src/main/java/org/jclouds/ovf/Disk.java index 9d4d3c2907..5da1c79fee 100644 --- a/compute/src/main/java/org/jclouds/ovf/Disk.java +++ b/compute/src/main/java/org/jclouds/ovf/Disk.java @@ -22,7 +22,7 @@ import java.net.URI; * * @author Adrian Cole */ -public class Disk implements Comparable{ +public class Disk implements Comparable { public static Builder builder() { return new Builder(); } diff --git a/compute/src/test/java/org/jclouds/compute/StubComputeServiceIntegrationTest.java b/compute/src/test/java/org/jclouds/compute/StubComputeServiceIntegrationTest.java index 835b1e1d52..257c587c47 100644 --- a/compute/src/test/java/org/jclouds/compute/StubComputeServiceIntegrationTest.java +++ b/compute/src/test/java/org/jclouds/compute/StubComputeServiceIntegrationTest.java @@ -83,7 +83,7 @@ public class StubComputeServiceIntegrationTest extends BaseComputeServiceLiveTes socketTester = retry(socketOpen, 1, 1, MILLISECONDS); - openSocketFinder = new OpenSocketFinder(){ + openSocketFinder = new OpenSocketFinder() { @Override public HostAndPort findOpenSocketOnNode(NodeMetadata node, int port, long timeoutValue, TimeUnit timeUnits) { diff --git a/compute/src/test/java/org/jclouds/ssh/config/RsaSshKeyPairGeneratorTest.java b/compute/src/test/java/org/jclouds/ssh/config/RsaSshKeyPairGeneratorTest.java index f6ef27b3e7..a5e4840e1e 100644 --- a/compute/src/test/java/org/jclouds/ssh/config/RsaSshKeyPairGeneratorTest.java +++ b/compute/src/test/java/org/jclouds/ssh/config/RsaSshKeyPairGeneratorTest.java @@ -80,7 +80,7 @@ public class RsaSshKeyPairGeneratorTest { replay(crypto, rsaKeyPairGenerator, secureRandom); - RsaSshKeyPairGenerator supplier = Guice.createInjector(new AbstractModule(){ + RsaSshKeyPairGenerator supplier = Guice.createInjector(new AbstractModule() { protected void configure() { bind(Crypto.class).toInstance(crypto); bind(SecureRandom.class).toInstance(secureRandom); diff --git a/core/src/main/java/org/jclouds/ContextBuilder.java b/core/src/main/java/org/jclouds/ContextBuilder.java index 16ef8d363c..6c62619103 100644 --- a/core/src/main/java/org/jclouds/ContextBuilder.java +++ b/core/src/main/java/org/jclouds/ContextBuilder.java @@ -408,11 +408,11 @@ public class ContextBuilder { } static Properties resolveProperties(Properties mutable, String providerId, Set keys, Set optionalKeys) throws NoSuchElementException { - for (String key : keys){ + for (String key : keys) { try { String scopedProperty = ImmutableList.copyOf(Splitter.on('.').split(key)).get(1); mutable.setProperty(key, searchPropertiesForProviderScopedProperty(mutable, providerId,scopedProperty)); - } catch (NoSuchElementException e){ + } catch (NoSuchElementException e) { if (!optionalKeys.contains(key)) throw e; } diff --git a/core/src/main/java/org/jclouds/apis/ApiMetadata.java b/core/src/main/java/org/jclouds/apis/ApiMetadata.java index fc17e87554..d309a2b4e5 100644 --- a/core/src/main/java/org/jclouds/apis/ApiMetadata.java +++ b/core/src/main/java/org/jclouds/apis/ApiMetadata.java @@ -39,7 +39,7 @@ import com.google.inject.Module; @Beta public interface ApiMetadata { - public static interface Builder>{ + public static interface Builder> { /** * @see ApiMetadata#getId() */ diff --git a/core/src/main/java/org/jclouds/collect/AdvanceUntilEmptyIterable.java b/core/src/main/java/org/jclouds/collect/AdvanceUntilEmptyIterable.java index 0c8e62bcbf..ff9d55b427 100644 --- a/core/src/main/java/org/jclouds/collect/AdvanceUntilEmptyIterable.java +++ b/core/src/main/java/org/jclouds/collect/AdvanceUntilEmptyIterable.java @@ -36,7 +36,7 @@ import com.google.common.collect.UnmodifiableIterator; @Beta public class AdvanceUntilEmptyIterable extends FluentIterable> { - public static AdvanceUntilEmptyIterable create(Supplier> nextIterable){ + public static AdvanceUntilEmptyIterable create(Supplier> nextIterable) { return new AdvanceUntilEmptyIterable(nextIterable); } diff --git a/core/src/main/java/org/jclouds/concurrent/config/ExecutorServiceModule.java b/core/src/main/java/org/jclouds/concurrent/config/ExecutorServiceModule.java index 76b0588f7c..b1717e4d11 100644 --- a/core/src/main/java/org/jclouds/concurrent/config/ExecutorServiceModule.java +++ b/core/src/main/java/org/jclouds/concurrent/config/ExecutorServiceModule.java @@ -100,7 +100,7 @@ public class ExecutorServiceModule extends AbstractModule { @Provides @Singleton - TimeLimiter timeLimiter(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor){ + TimeLimiter timeLimiter(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor) { return new SimpleTimeLimiter(userExecutor); } diff --git a/core/src/main/java/org/jclouds/encryption/internal/JCECrypto.java b/core/src/main/java/org/jclouds/encryption/internal/JCECrypto.java index a563ccf33b..df44d67b52 100644 --- a/core/src/main/java/org/jclouds/encryption/internal/JCECrypto.java +++ b/core/src/main/java/org/jclouds/encryption/internal/JCECrypto.java @@ -63,15 +63,15 @@ public class JCECrypto implements Crypto { @Override public Mac hmac(String algorithm, byte[] key) throws NoSuchAlgorithmException, InvalidKeyException { Mac mac = null; - if(provider != null) { + if (provider != null) { try { mac = Mac.getInstance(algorithm, provider); - } catch(Exception e) { + } catch (Exception e) { //Provider does not function. //Do nothing and let it fallback to the default way. } } - if(mac == null) { + if (mac == null) { mac = Mac.getInstance(algorithm); } SecretKeySpec signingKey = new SecretKeySpec(key, algorithm); diff --git a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java index fac7c55f1d..33b07f17e6 100644 --- a/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java +++ b/core/src/main/java/org/jclouds/http/internal/JavaUrlHttpCommandExecutorService.java @@ -191,7 +191,7 @@ public class JavaUrlHttpCommandExecutorService extends BaseHttpCommandExecutorSe } String host = request.getEndpoint().getHost(); - if(request.getEndpoint().getPort() != -1) { + if (request.getEndpoint().getPort() != -1) { host += ":" + request.getEndpoint().getPort(); } connection.setRequestProperty(HOST, host); diff --git a/core/src/main/java/org/jclouds/location/config/LocationModule.java b/core/src/main/java/org/jclouds/location/config/LocationModule.java index 075c6e37f7..a4e9394e7e 100644 --- a/core/src/main/java/org/jclouds/location/config/LocationModule.java +++ b/core/src/main/java/org/jclouds/location/config/LocationModule.java @@ -131,7 +131,7 @@ public class LocationModule extends AbstractModule { Suppliers.compose(new FilterStrings(filter), uncached), seconds, TimeUnit.SECONDS); } - static class FilterStrings implements Function, Set>{ + static class FilterStrings implements Function, Set> { public final Predicate filter; public FilterStrings(Predicate filter) { diff --git a/core/src/main/java/org/jclouds/location/functions/RegionToEndpointOrProviderIfNull.java b/core/src/main/java/org/jclouds/location/functions/RegionToEndpointOrProviderIfNull.java index 0cf8b7f74c..2159684f4c 100644 --- a/core/src/main/java/org/jclouds/location/functions/RegionToEndpointOrProviderIfNull.java +++ b/core/src/main/java/org/jclouds/location/functions/RegionToEndpointOrProviderIfNull.java @@ -58,7 +58,7 @@ public class RegionToEndpointOrProviderIfNull implements Function { return defaultUri.get(); checkArgument(from instanceof String, "region is a String argument"); Map> regionToEndpoint = regionToEndpointSupplier.get(); - if (from.equals(defaultProvider)){ + if (from.equals(defaultProvider)) { if (regionToEndpoint.containsKey(from)) return regionToEndpoint.get(from).get(); return defaultUri.get(); diff --git a/core/src/main/java/org/jclouds/location/suppliers/fromconfig/LocationIdToURIFromConfigurationOrDefaultToProvider.java b/core/src/main/java/org/jclouds/location/suppliers/fromconfig/LocationIdToURIFromConfigurationOrDefaultToProvider.java index 76e8246499..9aeab6e2f5 100644 --- a/core/src/main/java/org/jclouds/location/suppliers/fromconfig/LocationIdToURIFromConfigurationOrDefaultToProvider.java +++ b/core/src/main/java/org/jclouds/location/suppliers/fromconfig/LocationIdToURIFromConfigurationOrDefaultToProvider.java @@ -37,7 +37,7 @@ import com.google.common.collect.ImmutableMap.Builder; import com.google.inject.assistedinject.Assisted; @Singleton -public class LocationIdToURIFromConfigurationOrDefaultToProvider implements Supplier>>{ +public class LocationIdToURIFromConfigurationOrDefaultToProvider implements Supplier>> { @Resource protected Logger logger = Logger.NULL; diff --git a/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java b/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java index 4e5ad5005b..87e5603741 100644 --- a/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java +++ b/core/src/main/java/org/jclouds/logging/config/BindLoggersAnnotatedWithResource.java @@ -116,7 +116,7 @@ public class BindLoggersAnnotatedWithResource implements TypeListener { Logger logger = loggerFactory.getLogger(type.getName()); for (Field field : loggerFields) { - if (field.isAnnotationPresent(Named.class)){ + if (field.isAnnotationPresent(Named.class)) { Named name = field.getAnnotation(Named.class); encounter.register(new AssignLoggerToField(loggerFactory.getLogger(name.value()), field)); } else { diff --git a/core/src/test/java/org/jclouds/apis/BaseApiLiveTest.java b/core/src/test/java/org/jclouds/apis/BaseApiLiveTest.java index 579bc14b37..dcae0fabf3 100644 --- a/core/src/test/java/org/jclouds/apis/BaseApiLiveTest.java +++ b/core/src/test/java/org/jclouds/apis/BaseApiLiveTest.java @@ -124,7 +124,7 @@ public abstract class BaseApiLiveTest { if (provider != null) try { return ContextBuilder.newBuilder(provider); - } catch (NoSuchElementException e){ + } catch (NoSuchElementException e) { Logger.getAnonymousLogger() .warning("provider [" + provider diff --git a/core/src/test/java/org/jclouds/apis/BaseContextLiveTest.java b/core/src/test/java/org/jclouds/apis/BaseContextLiveTest.java index e0e5777a5e..0dbaf4b267 100644 --- a/core/src/test/java/org/jclouds/apis/BaseContextLiveTest.java +++ b/core/src/test/java/org/jclouds/apis/BaseContextLiveTest.java @@ -123,7 +123,7 @@ public abstract class BaseContextLiveTest { if (provider != null) try { return ContextBuilder.newBuilder(provider); - } catch (NoSuchElementException e){ + } catch (NoSuchElementException e) { Logger.getAnonymousLogger() .warning("provider [" + provider diff --git a/core/src/test/java/org/jclouds/apis/BaseViewLiveTest.java b/core/src/test/java/org/jclouds/apis/BaseViewLiveTest.java index 14d479488c..caf402e75c 100644 --- a/core/src/test/java/org/jclouds/apis/BaseViewLiveTest.java +++ b/core/src/test/java/org/jclouds/apis/BaseViewLiveTest.java @@ -31,7 +31,7 @@ import com.google.inject.Module; * * @author Adrian Cole */ -public abstract class BaseViewLiveTest extends BaseContextLiveTest{ +public abstract class BaseViewLiveTest extends BaseContextLiveTest { protected volatile V view; diff --git a/core/src/test/java/org/jclouds/apis/JcloudsTestBlobStoreApiMetadata.java b/core/src/test/java/org/jclouds/apis/JcloudsTestBlobStoreApiMetadata.java index 48b6f52ffd..64446ee1ca 100644 --- a/core/src/test/java/org/jclouds/apis/JcloudsTestBlobStoreApiMetadata.java +++ b/core/src/test/java/org/jclouds/apis/JcloudsTestBlobStoreApiMetadata.java @@ -48,7 +48,7 @@ public class JcloudsTestBlobStoreApiMetadata extends BaseRestApiMetadata { public static class Builder extends BaseRestApiMetadata.Builder { - protected Builder(){ + protected Builder() { super(IntegrationTestClient.class, IntegrationTestAsyncClient.class); id("test-blobstore-api") .view(Storage.class) diff --git a/core/src/test/java/org/jclouds/apis/JcloudsTestComputeApiMetadata.java b/core/src/test/java/org/jclouds/apis/JcloudsTestComputeApiMetadata.java index 1beb92d53a..5ba50f7da7 100644 --- a/core/src/test/java/org/jclouds/apis/JcloudsTestComputeApiMetadata.java +++ b/core/src/test/java/org/jclouds/apis/JcloudsTestComputeApiMetadata.java @@ -48,7 +48,7 @@ public class JcloudsTestComputeApiMetadata extends BaseRestApiMetadata { public static class Builder extends BaseRestApiMetadata.Builder { - protected Builder(){ + protected Builder() { super(IntegrationTestClient.class, IntegrationTestAsyncClient.class); id("test-compute-api") .view(Compute.class) diff --git a/core/src/test/java/org/jclouds/apis/JcloudsTestYetAnotherComputeApiMetadata.java b/core/src/test/java/org/jclouds/apis/JcloudsTestYetAnotherComputeApiMetadata.java index c53deffc1c..476ff6d050 100644 --- a/core/src/test/java/org/jclouds/apis/JcloudsTestYetAnotherComputeApiMetadata.java +++ b/core/src/test/java/org/jclouds/apis/JcloudsTestYetAnotherComputeApiMetadata.java @@ -48,7 +48,7 @@ public class JcloudsTestYetAnotherComputeApiMetadata extends BaseRestApiMetadata public static class Builder extends BaseRestApiMetadata.Builder { - protected Builder(){ + protected Builder() { super(IntegrationTestClient.class, IntegrationTestAsyncClient.class); id("test-yet-another-compute-api") .view(Compute.class) diff --git a/core/src/test/java/org/jclouds/fallbacks/HeaderToRetryAfterExceptionTest.java b/core/src/test/java/org/jclouds/fallbacks/HeaderToRetryAfterExceptionTest.java index cf3006df69..e0108af5fc 100644 --- a/core/src/test/java/org/jclouds/fallbacks/HeaderToRetryAfterExceptionTest.java +++ b/core/src/test/java/org/jclouds/fallbacks/HeaderToRetryAfterExceptionTest.java @@ -38,19 +38,19 @@ import com.google.common.net.HttpHeaders; public class HeaderToRetryAfterExceptionTest { @Test(expectedExceptions = RuntimeException.class) - public void testArbitraryExceptionDoesntConvert(){ + public void testArbitraryExceptionDoesntConvert() { fn.create(new RuntimeException()); } - public void testHttpResponseExceptionWithoutResponseDoesntPropagate(){ + public void testHttpResponseExceptionWithoutResponseDoesntPropagate() { fn.create(new HttpResponseException("message", command, null)); } - public void testHttpResponseExceptionWithoutRetryAfterHeaderDoesntPropagate(){ + public void testHttpResponseExceptionWithoutRetryAfterHeaderDoesntPropagate() { fn.create(new HttpResponseException(command, HttpResponse.builder().statusCode(500).build())); } - public void testHttpResponseExceptionWithMalformedRetryAfterHeaderDoesntConvert(){ + public void testHttpResponseExceptionWithMalformedRetryAfterHeaderDoesntConvert() { fn.create(new HttpResponseException(command, HttpResponse.builder() .statusCode(503) @@ -66,7 +66,7 @@ public class HeaderToRetryAfterExceptionTest { } @Test(expectedExceptions = RetryAfterException.class, expectedExceptionsMessageRegExp = "retry in 700 seconds") - public void testHttpResponseExceptionWithRetryAfterOffset(){ + public void testHttpResponseExceptionWithRetryAfterOffset() { fn.create(new HttpResponseException(command, HttpResponse.builder() .statusCode(503) @@ -74,7 +74,7 @@ public class HeaderToRetryAfterExceptionTest { } @Test(expectedExceptions = RetryAfterException.class, expectedExceptionsMessageRegExp = "retry in 86400 seconds") - public void testHttpResponseExceptionWithRetryAfterPastIsZero(){ + public void testHttpResponseExceptionWithRetryAfterPastIsZero() { fn.create(new HttpResponseException(command, HttpResponse.builder() .statusCode(503) @@ -85,7 +85,7 @@ public class HeaderToRetryAfterExceptionTest { static DateCodec rfc822 = new DateServiceRfc822Codec(new SimpleDateFormatDateService()); - static Ticker y2k = new Ticker(){ + static Ticker y2k = new Ticker() { @Override public long read() { diff --git a/core/src/test/java/org/jclouds/location/predicates/fromconfig/AnyOrConfiguredRegionIdTest.java b/core/src/test/java/org/jclouds/location/predicates/fromconfig/AnyOrConfiguredRegionIdTest.java index bb9ae46d13..1707b0147b 100644 --- a/core/src/test/java/org/jclouds/location/predicates/fromconfig/AnyOrConfiguredRegionIdTest.java +++ b/core/src/test/java/org/jclouds/location/predicates/fromconfig/AnyOrConfiguredRegionIdTest.java @@ -42,7 +42,7 @@ public class AnyOrConfiguredRegionIdTest { public void testWithoutConfigAllIdsMatch() { Set regionIds = ImmutableSet.of("us-east-1", "eu-west-1"); - RegionIdFilter filter = Guice.createInjector(new AbstractModule(){ + RegionIdFilter filter = Guice.createInjector(new AbstractModule() { @Override protected void configure() { @@ -57,7 +57,7 @@ public class AnyOrConfiguredRegionIdTest { public void testWithConfigOnlyMatchingIds() { Set regionIds = ImmutableSet.of("us-east-1", "eu-west-1"); - RegionIdFilter filter = Guice.createInjector(new AbstractModule(){ + RegionIdFilter filter = Guice.createInjector(new AbstractModule() { @Override protected void configure() { diff --git a/core/src/test/java/org/jclouds/location/predicates/fromconfig/AnyOrConfiguredZoneIdTest.java b/core/src/test/java/org/jclouds/location/predicates/fromconfig/AnyOrConfiguredZoneIdTest.java index 333371a471..6944669b7f 100644 --- a/core/src/test/java/org/jclouds/location/predicates/fromconfig/AnyOrConfiguredZoneIdTest.java +++ b/core/src/test/java/org/jclouds/location/predicates/fromconfig/AnyOrConfiguredZoneIdTest.java @@ -42,7 +42,7 @@ public class AnyOrConfiguredZoneIdTest { public void testWithoutConfigAllIdsMatch() { Set zoneIds = ImmutableSet.of("us-east-1a", "us-east-1b"); - ZoneIdFilter filter = Guice.createInjector(new AbstractModule(){ + ZoneIdFilter filter = Guice.createInjector(new AbstractModule() { @Override protected void configure() { @@ -57,7 +57,7 @@ public class AnyOrConfiguredZoneIdTest { public void testWithConfigOnlyMatchingIds() { Set zoneIds = ImmutableSet.of("us-east-1a", "us-east-1b"); - ZoneIdFilter filter = Guice.createInjector(new AbstractModule(){ + ZoneIdFilter filter = Guice.createInjector(new AbstractModule() { @Override protected void configure() { diff --git a/core/src/test/java/org/jclouds/logging/BufferLogger.java b/core/src/test/java/org/jclouds/logging/BufferLogger.java index c6262b8601..d203169033 100644 --- a/core/src/test/java/org/jclouds/logging/BufferLogger.java +++ b/core/src/test/java/org/jclouds/logging/BufferLogger.java @@ -66,14 +66,14 @@ public class BufferLogger extends BaseLogger { */ public Record assertLogContains(String fragment) { for (Record r: messages) { - if (r.getMessage()!=null && r.getMessage().contains(fragment)) return r; + if (r.getMessage() != null && r.getMessage().contains(fragment)) return r; } throw new AssertionError("log did not contain expected '"+fragment+"'"); } /** fails if log _does_ contain the indicated fragment */ public void assertLogDoesntContain(String fragment) { for (Record r: messages) { - if (r.getMessage()!=null && r.getMessage().contains(fragment)) + if (r.getMessage() != null && r.getMessage().contains(fragment)) throw new AssertionError("log contained unexpected '"+fragment+"'"); } } @@ -83,7 +83,7 @@ public class BufferLogger extends BaseLogger { */ public Record assertLogContains(Predicate test) { for (Record r: messages) { - if (r.getMessage()!=null && test.apply(r)) return r; + if (r.getMessage() != null && test.apply(r)) return r; } throw new AssertionError("log did not contain any records satisfying expected predicate"); } diff --git a/core/src/test/java/org/jclouds/providers/JcloudsTestBlobStoreProviderMetadata.java b/core/src/test/java/org/jclouds/providers/JcloudsTestBlobStoreProviderMetadata.java index e0220a1595..b341a2f573 100644 --- a/core/src/test/java/org/jclouds/providers/JcloudsTestBlobStoreProviderMetadata.java +++ b/core/src/test/java/org/jclouds/providers/JcloudsTestBlobStoreProviderMetadata.java @@ -49,7 +49,7 @@ public class JcloudsTestBlobStoreProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("test-blobstore-api") .name("Test Blobstore Provider") .endpoint("http://mock") diff --git a/core/src/test/java/org/jclouds/providers/JcloudsTestComputeProviderMetadata.java b/core/src/test/java/org/jclouds/providers/JcloudsTestComputeProviderMetadata.java index ab928a5012..0d7cdb330f 100644 --- a/core/src/test/java/org/jclouds/providers/JcloudsTestComputeProviderMetadata.java +++ b/core/src/test/java/org/jclouds/providers/JcloudsTestComputeProviderMetadata.java @@ -49,7 +49,7 @@ public class JcloudsTestComputeProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("test-compute-api") .name("Test Compute Provider") .endpoint("mem2") diff --git a/core/src/test/java/org/jclouds/providers/JcloudsTestYetAnotherComputeProviderMetadata.java b/core/src/test/java/org/jclouds/providers/JcloudsTestYetAnotherComputeProviderMetadata.java index 41c8b16641..4b4a99fc00 100644 --- a/core/src/test/java/org/jclouds/providers/JcloudsTestYetAnotherComputeProviderMetadata.java +++ b/core/src/test/java/org/jclouds/providers/JcloudsTestYetAnotherComputeProviderMetadata.java @@ -49,7 +49,7 @@ public class JcloudsTestYetAnotherComputeProviderMetadata extends BaseProviderMe public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("test-yet-another-compute-provider") .name("Test Yet Another Compute Provider") .endpoint("mem3") diff --git a/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java b/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java index 861dd85d68..eff44c401d 100644 --- a/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java +++ b/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java @@ -60,7 +60,7 @@ public class Reflection2CoreJavaClassesTest { try { // generate a stacktrace throw new Exception(); - } catch(Exception exception) { + } catch (Exception exception) { // fail *only* if being called from this test for (StackTraceElement element : exception.getStackTrace()) { if (element.getMethodName().equals(testMethod.getName())) { diff --git a/core/src/test/java/org/jclouds/rest/annotationparsing/ProvidesAnnotationExpectTest.java b/core/src/test/java/org/jclouds/rest/annotationparsing/ProvidesAnnotationExpectTest.java index c913143457..9683e018e0 100644 --- a/core/src/test/java/org/jclouds/rest/annotationparsing/ProvidesAnnotationExpectTest.java +++ b/core/src/test/java/org/jclouds/rest/annotationparsing/ProvidesAnnotationExpectTest.java @@ -84,25 +84,25 @@ public class ProvidesAnnotationExpectTest extends BaseRestClientExpectTest of()); assertEquals(client.set(), ImmutableSet.of("foo")); } @Test - public void testProvidesWithGenericQualified(){ + public void testProvidesWithGenericQualified() { ProvidingApi client = requestsSendResponses(ImmutableMap. of()); assertEquals(client.foo(), ImmutableSet.of("bar")); } @Test(expectedExceptions = AuthorizationException.class) - public void testProvidesWithGenericQualifiedAuthorizationException(){ + public void testProvidesWithGenericQualifiedAuthorizationException() { ProvidingApi client = requestsSendResponses(ImmutableMap. of()); client.exception(); } @Test(expectedExceptions = NoSuchElementException.class) - public void testProvidesWithGenericQualifiedNoSuchElementException(){ + public void testProvidesWithGenericQualifiedNoSuchElementException() { ProvidingApi client = requestsSendResponses(ImmutableMap. of()); client.noSuchElementException(); } diff --git a/core/src/test/java/org/jclouds/rest/internal/BaseRestApiExpectTest.java b/core/src/test/java/org/jclouds/rest/internal/BaseRestApiExpectTest.java index 76186228b0..a8425fee0b 100644 --- a/core/src/test/java/org/jclouds/rest/internal/BaseRestApiExpectTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/BaseRestApiExpectTest.java @@ -240,7 +240,7 @@ public abstract class BaseRestApiExpectTest { @Provides @Singleton - TimeLimiter timeLimiter(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor){ + TimeLimiter timeLimiter(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor) { return new SimpleTimeLimiter(userExecutor); } } diff --git a/core/src/test/java/org/jclouds/rest/internal/BaseRestApiTest.java b/core/src/test/java/org/jclouds/rest/internal/BaseRestApiTest.java index a1d30fce57..0923f4c0bc 100644 --- a/core/src/test/java/org/jclouds/rest/internal/BaseRestApiTest.java +++ b/core/src/test/java/org/jclouds/rest/internal/BaseRestApiTest.java @@ -90,7 +90,7 @@ public abstract class BaseRestApiTest { @Provides @Singleton - TimeLimiter timeLimiter(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor){ + TimeLimiter timeLimiter(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor) { return new SimpleTimeLimiter(userExecutor); } } diff --git a/drivers/apachehc/src/main/java/org/jclouds/http/apachehc/ApacheHCHttpCommandExecutorService.java b/drivers/apachehc/src/main/java/org/jclouds/http/apachehc/ApacheHCHttpCommandExecutorService.java index 6e8827e2a6..f94b07af91 100644 --- a/drivers/apachehc/src/main/java/org/jclouds/http/apachehc/ApacheHCHttpCommandExecutorService.java +++ b/drivers/apachehc/src/main/java/org/jclouds/http/apachehc/ApacheHCHttpCommandExecutorService.java @@ -71,7 +71,7 @@ public class ApacheHCHttpCommandExecutorService extends BaseHttpCommandExecutorS @Override protected HttpUriRequest convert(HttpRequest request) throws IOException { HttpUriRequest returnVal = apacheHCUtils.convertToApacheRequest(request); - if (request.getPayload() != null && request.getPayload().getContentMetadata().getContentMD5() != null){ + if (request.getPayload() != null && request.getPayload().getContentMetadata().getContentMD5() != null) { String md5 = base64().encode(asByteSource(request.getPayload().getInput()).hash(md5()).asBytes()); returnVal.addHeader("Content-MD5", md5); } diff --git a/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java index ac29523f60..4f6d0de46b 100644 --- a/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java +++ b/providers/aws-cloudwatch/src/main/java/org/jclouds/aws/cloudwatch/AWSCloudWatchProviderMetadata.java @@ -75,7 +75,7 @@ public class AWSCloudWatchProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("aws-cloudwatch") .name("Amazon CloudWatch") .endpoint("https://monitoring.us-east-1.amazonaws.com") diff --git a/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/features/AWSMetricApiLiveTest.java b/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/features/AWSMetricApiLiveTest.java index c0f152a529..5b044daba4 100644 --- a/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/features/AWSMetricApiLiveTest.java +++ b/providers/aws-cloudwatch/src/test/java/org/jclouds/aws/cloudwatch/features/AWSMetricApiLiveTest.java @@ -24,7 +24,7 @@ import org.testng.annotations.Test; */ @Test(groups = "live", testName = "AWSMetricApiLiveTest") public class AWSMetricApiLiveTest extends MetricApiLiveTest { - public AWSMetricApiLiveTest(){ + public AWSMetricApiLiveTest() { provider = "aws-cloudwatch"; } diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java index 8a915acc57..7cb4c83803 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ApiMetadata.java @@ -56,7 +56,7 @@ public final class AWSEC2ApiMetadata extends BaseHttpApiMetadata { return properties; } - public final static class Builder extends BaseHttpApiMetadata.Builder { + public static final class Builder extends BaseHttpApiMetadata.Builder { public Builder() { id("aws-ec2") .version("2012-06-01") diff --git a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java index 8a88997765..7827171e78 100644 --- a/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java +++ b/providers/aws-ec2/src/main/java/org/jclouds/aws/ec2/AWSEC2ProviderMetadata.java @@ -64,7 +64,7 @@ public class AWSEC2ProviderMetadata extends BaseProviderMetadata { properties.setProperty(PROPERTY_EC2_AMI_QUERY, "owner-id=137112412989,801119661308,063491364108,099720109477,411009282317;state=available;image-type=machine"); // amis that work with the cluster instances - properties.setProperty(PROPERTY_EC2_CC_REGIONS, Region.US_EAST_1 + "," + Region.US_WEST_2 + ","+ Region.EU_WEST_1); + properties.setProperty(PROPERTY_EC2_CC_REGIONS, Region.US_EAST_1 + "," + Region.US_WEST_2 + "," + Region.EU_WEST_1); properties .setProperty( PROPERTY_EC2_CC_AMI_QUERY, @@ -75,7 +75,7 @@ public class AWSEC2ProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("aws-ec2") .name("Amazon Elastic Compute Cloud (EC2)") .apiMetadata(new AWSEC2ApiMetadata()) diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/functions/AWSRunningInstanceToNodeMetadataTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/functions/AWSRunningInstanceToNodeMetadataTest.java index 6385b80126..f231882481 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/functions/AWSRunningInstanceToNodeMetadataTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/compute/functions/AWSRunningInstanceToNodeMetadataTest.java @@ -169,7 +169,7 @@ public class AWSRunningInstanceToNodeMetadataTest { final Map backing = ImagesToRegionAndIdMap.imagesToMap(images); - LoadingCache instanceToImage = CacheBuilder.newBuilder().build(new CacheLoader (){ + LoadingCache instanceToImage = CacheBuilder.newBuilder().build(new CacheLoader() { @Override public Image load(RegionAndName key) throws Exception { diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/features/BaseAWSEC2ApiTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/features/BaseAWSEC2ApiTest.java index aa796211fc..f617c9b653 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/features/BaseAWSEC2ApiTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/features/BaseAWSEC2ApiTest.java @@ -128,7 +128,7 @@ public abstract class BaseAWSEC2ApiTest extends BaseAsyncApiTest { protected String provider = "aws-ec2"; @Override - public AWSEC2ProviderMetadata createProviderMetadata(){ + public AWSEC2ProviderMetadata createProviderMetadata() { return new AWSEC2ProviderMetadata(); } diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/xml/DescribeSpotPriceHistoryResponseHandlerTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/xml/DescribeSpotPriceHistoryResponseHandlerTest.java index 6af8a0fff4..ee4f08d24f 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/xml/DescribeSpotPriceHistoryResponseHandlerTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/xml/DescribeSpotPriceHistoryResponseHandlerTest.java @@ -58,7 +58,7 @@ public class DescribeSpotPriceHistoryResponseHandlerTest extends BaseHandlerTest ); - Set result = factory.create(injector.createChildInjector(new AbstractModule(){ + Set result = factory.create(injector.createChildInjector(new AbstractModule() { @Override protected void configure() { diff --git a/providers/aws-route53/src/main/java/org/jclouds/aws/route53/AWSRoute53ProviderMetadata.java b/providers/aws-route53/src/main/java/org/jclouds/aws/route53/AWSRoute53ProviderMetadata.java index 87891cc6b1..82ed4f7378 100644 --- a/providers/aws-route53/src/main/java/org/jclouds/aws/route53/AWSRoute53ProviderMetadata.java +++ b/providers/aws-route53/src/main/java/org/jclouds/aws/route53/AWSRoute53ProviderMetadata.java @@ -55,7 +55,7 @@ public class AWSRoute53ProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("aws-route53") .name("Amazon Route53") .endpoint("https://route53.amazonaws.com") diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java index d896a9ff8a..9ff3841b6e 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ApiMetadata.java @@ -68,7 +68,7 @@ public class AWSS3ApiMetadata extends S3ApiMetadata { public static class Builder extends S3ApiMetadata.Builder { @SuppressWarnings("deprecation") - protected Builder(){ + protected Builder() { super(AWSS3Client.class, AWSS3AsyncClient.class); id("aws-s3") .name("Amazon-specific S3 API") diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java index a23b43a34b..efcc871927 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/AWSS3ProviderMetadata.java @@ -80,7 +80,7 @@ public class AWSS3ProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("aws-s3") .name("Amazon Simple Storage Service (S3)") .apiMetadata(new AWSS3ApiMetadata()) diff --git a/providers/aws-sqs/src/main/java/org/jclouds/aws/sqs/AWSSQSProviderMetadata.java b/providers/aws-sqs/src/main/java/org/jclouds/aws/sqs/AWSSQSProviderMetadata.java index 28853e4a11..473e15b74f 100644 --- a/providers/aws-sqs/src/main/java/org/jclouds/aws/sqs/AWSSQSProviderMetadata.java +++ b/providers/aws-sqs/src/main/java/org/jclouds/aws/sqs/AWSSQSProviderMetadata.java @@ -83,7 +83,7 @@ public class AWSSQSProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("aws-sqs") .name("Amazon Simple Queue Service") .endpoint("https://sqs.us-east-1.amazonaws.com") diff --git a/providers/aws-sts/src/main/java/org/jclouds/aws/sts/AWSSTSProviderMetadata.java b/providers/aws-sts/src/main/java/org/jclouds/aws/sts/AWSSTSProviderMetadata.java index a3ab4a10b7..31b24625de 100644 --- a/providers/aws-sts/src/main/java/org/jclouds/aws/sts/AWSSTSProviderMetadata.java +++ b/providers/aws-sts/src/main/java/org/jclouds/aws/sts/AWSSTSProviderMetadata.java @@ -55,7 +55,7 @@ public class AWSSTSProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("aws-sts") .name("Amazon STS") .endpoint("https://sts.amazonaws.com") diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java index a1835d3c89..884526518c 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobApiMetadata.java @@ -73,7 +73,7 @@ public class AzureBlobApiMetadata extends BaseRestApiMetadata { public static class Builder extends BaseRestApiMetadata.Builder { @SuppressWarnings("deprecation") - protected Builder(){ + protected Builder() { super(AzureBlobClient.class, AzureBlobAsyncClient.class); id("azureblob") .name("Microsoft Azure Blob Service API") diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobProviderMetadata.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobProviderMetadata.java index 3e532d1895..6019054c08 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobProviderMetadata.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/AzureBlobProviderMetadata.java @@ -52,7 +52,7 @@ public class AzureBlobProviderMetadata extends BaseProviderMetadata { } public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("azureblob") .name("Microsoft Azure Blob Service") .apiMetadata(new AzureBlobApiMetadata()) diff --git a/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSignerTest.java b/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSignerTest.java index e26ba14731..284455524d 100644 --- a/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSignerTest.java +++ b/providers/azureblob/src/test/java/org/jclouds/azureblob/blobstore/AzureBlobRequestSignerTest.java @@ -46,7 +46,7 @@ import com.google.inject.Module; @Test(groups = "unit", testName = "AzureBlobRequestSignerTest") public class AzureBlobRequestSignerTest extends BaseAsyncClientTest { - public AzureBlobRequestSignerTest(){ + public AzureBlobRequestSignerTest() { // this is base64 decoded in the signer; credential = "aaaabbbb"; } diff --git a/providers/azureblob/src/test/java/org/jclouds/azureblob/predicates/validators/ContainerNameValidatorTest.java b/providers/azureblob/src/test/java/org/jclouds/azureblob/predicates/validators/ContainerNameValidatorTest.java index 39ad3009df..1b3ca4f5ab 100644 --- a/providers/azureblob/src/test/java/org/jclouds/azureblob/predicates/validators/ContainerNameValidatorTest.java +++ b/providers/azureblob/src/test/java/org/jclouds/azureblob/predicates/validators/ContainerNameValidatorTest.java @@ -42,7 +42,7 @@ public class ContainerNameValidatorTest { //double dash - should fail validator.validate("adasd-ab--baba"); throw new RuntimeException("to be converted to TestException later"); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // supposed to happen - continue } @@ -50,7 +50,7 @@ public class ContainerNameValidatorTest { // dots - should fail validator.validate("abc.zz.la"); throw new RuntimeException("to be converted to TestException later"); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // supposed to happen - continue } @@ -58,14 +58,14 @@ public class ContainerNameValidatorTest { // uppercase - should fail validator.validate("abcZZla"); throw new RuntimeException("to be converted to TestException later"); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // supposed to happen - continue } try { validator.validate("zz"); throw new RuntimeException("to be converted to TestException later"); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // supposed to happen - continue } @@ -73,7 +73,7 @@ public class ContainerNameValidatorTest { // non-ASCII - should fail validator.validate("a????"); throw new RuntimeException("to be converted to TestException later"); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // supposed to happen - continue } @@ -81,7 +81,7 @@ public class ContainerNameValidatorTest { // starts with dash - should fail validator.validate("-adasd"); throw new RuntimeException("to be converted to TestException later"); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // supposed to happen - continue } @@ -89,7 +89,7 @@ public class ContainerNameValidatorTest { // ends with dash - should fail validator.validate("adasd-"); throw new RuntimeException("to be converted to TestException later"); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { // supposed to happen - continue } diff --git a/providers/bluelock-vcloud-zone01/src/main/java/org/jclouds/bluelock/vcloud/zone01/BluelockVCloudZone01ProviderMetadata.java b/providers/bluelock-vcloud-zone01/src/main/java/org/jclouds/bluelock/vcloud/zone01/BluelockVCloudZone01ProviderMetadata.java index 86c1c86437..06c1dcef2f 100644 --- a/providers/bluelock-vcloud-zone01/src/main/java/org/jclouds/bluelock/vcloud/zone01/BluelockVCloudZone01ProviderMetadata.java +++ b/providers/bluelock-vcloud-zone01/src/main/java/org/jclouds/bluelock/vcloud/zone01/BluelockVCloudZone01ProviderMetadata.java @@ -57,7 +57,7 @@ public class BluelockVCloudZone01ProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("bluelock-vcloud-zone01") .name("Bluelock vCloud Zone 1") .apiMetadata( diff --git a/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java b/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java index 23c4550aea..99a70ade34 100644 --- a/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java +++ b/providers/cloudfiles-uk/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUKProviderMetadata.java @@ -56,7 +56,7 @@ public class CloudFilesUKProviderMetadata extends BaseProviderMetadata { } public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("cloudfiles-uk") .name("Rackspace Cloud Files UK") .apiMetadata(new CloudFilesApiMetadata()) diff --git a/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java b/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java index 0159275d80..e465d4b65d 100644 --- a/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java +++ b/providers/cloudfiles-us/src/main/java/org/jclouds/rackspace/cloudfiles/CloudFilesUSProviderMetadata.java @@ -57,7 +57,7 @@ public class CloudFilesUSProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("cloudfiles-us") .name("Rackspace Cloud Files US") .apiMetadata(new CloudFilesApiMetadata()) diff --git a/providers/cloudonestorage/src/main/java/org/jclouds/cloudonestorage/CloudOneStorageProviderMetadata.java b/providers/cloudonestorage/src/main/java/org/jclouds/cloudonestorage/CloudOneStorageProviderMetadata.java index 57196c3675..5537c8153b 100644 --- a/providers/cloudonestorage/src/main/java/org/jclouds/cloudonestorage/CloudOneStorageProviderMetadata.java +++ b/providers/cloudonestorage/src/main/java/org/jclouds/cloudonestorage/CloudOneStorageProviderMetadata.java @@ -55,7 +55,7 @@ public class CloudOneStorageProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("cloudonestorage") .name("PEER1 CloudOne Storage") .apiMetadata(new AtmosApiMetadata()) diff --git a/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKProviderMetadata.java b/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKProviderMetadata.java index 0421628d21..6329838f90 100644 --- a/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKProviderMetadata.java +++ b/providers/cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUKProviderMetadata.java @@ -56,7 +56,7 @@ public class CloudServersUKProviderMetadata extends BaseProviderMetadata { } public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("cloudservers-uk") .name("Rackspace Cloud Servers UK") .apiMetadata(new CloudServersApiMetadata()) diff --git a/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSProviderMetadata.java b/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSProviderMetadata.java index f759946214..ff2175d88e 100644 --- a/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSProviderMetadata.java +++ b/providers/cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/CloudServersUSProviderMetadata.java @@ -57,7 +57,7 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("cloudservers-us") .name("Rackspace Cloud Servers US") .apiMetadata(new CloudServersApiMetadata()) diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/binders/CreateRecordBinder.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/binders/CreateRecordBinder.java index 761c4e3f46..61333be858 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/binders/CreateRecordBinder.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/binders/CreateRecordBinder.java @@ -34,7 +34,7 @@ public class CreateRecordBinder implements Binder { private final Json json; @Inject - CreateRecordBinder(Json json){ + CreateRecordBinder(Json json) { this.json = checkNotNull(json, "json"); } diff --git a/providers/glesys/src/main/java/org/jclouds/glesys/compute/GleSYSComputeServiceAdapter.java b/providers/glesys/src/main/java/org/jclouds/glesys/compute/GleSYSComputeServiceAdapter.java index 9858595c77..09a8fab101 100644 --- a/providers/glesys/src/main/java/org/jclouds/glesys/compute/GleSYSComputeServiceAdapter.java +++ b/providers/glesys/src/main/java/org/jclouds/glesys/compute/GleSYSComputeServiceAdapter.java @@ -192,7 +192,7 @@ public class GleSYSComputeServiceAdapter implements ComputeServiceAdapter(){ + return find(listImages(), new Predicate() { @Override public boolean apply(OSTemplate input) { diff --git a/providers/glesys/src/test/java/org/jclouds/glesys/features/ArchiveApiLiveTest.java b/providers/glesys/src/test/java/org/jclouds/glesys/features/ArchiveApiLiveTest.java index 48a0db139f..b43fafc523 100644 --- a/providers/glesys/src/test/java/org/jclouds/glesys/features/ArchiveApiLiveTest.java +++ b/providers/glesys/src/test/java/org/jclouds/glesys/features/ArchiveApiLiveTest.java @@ -81,7 +81,7 @@ public class ArchiveApiLiveTest extends BaseGleSYSApiLiveTest { public void testCreateArchive() throws Exception { try { archiveApi.delete(archiveUser); - } catch(Exception ex) { + } catch (Exception ex) { } int before = archiveApi.list().size(); diff --git a/providers/glesys/src/test/java/org/jclouds/glesys/features/DomainApiLiveTest.java b/providers/glesys/src/test/java/org/jclouds/glesys/features/DomainApiLiveTest.java index 198da8e7f3..4c5a117274 100644 --- a/providers/glesys/src/test/java/org/jclouds/glesys/features/DomainApiLiveTest.java +++ b/providers/glesys/src/test/java/org/jclouds/glesys/features/DomainApiLiveTest.java @@ -104,7 +104,7 @@ public class DomainApiLiveTest extends BaseGleSYSApiLiveTest { assertTrue(recordCounter.apply(before + 1)); - for(DomainRecord record : domainApi.listRecords(testDomain)) { + for (DomainRecord record : domainApi.listRecords(testDomain)) { if ("test".equals(record.getHost())) { assertEquals(record.getType(), "A"); assertEquals(record.getData(), "127.0.0.1"); @@ -121,7 +121,7 @@ public class DomainApiLiveTest extends BaseGleSYSApiLiveTest { assertTrue(recordCounter.apply(before + 1)); String recordId = null; - for(DomainRecord record : domainApi.listRecords(testDomain)) { + for (DomainRecord record : domainApi.listRecords(testDomain)) { if ("testeditbefore".equals(record.getHost())) { assertEquals(record.getType(), "A"); assertEquals(record.getData(), "127.0.0.1"); @@ -134,7 +134,7 @@ public class DomainApiLiveTest extends BaseGleSYSApiLiveTest { domainApi.updateRecord(recordId, UpdateRecordOptions.Builder.host("testeditafter")); boolean found = false; - for(DomainRecord record : domainApi.listRecords(testDomain)) { + for (DomainRecord record : domainApi.listRecords(testDomain)) { if (recordId.equals(record.getId())) { assertEquals(record.getHost(), "testeditafter"); assertEquals(record.getType(), "A"); diff --git a/providers/glesys/src/test/java/org/jclouds/glesys/features/ServerApiLiveTest.java b/providers/glesys/src/test/java/org/jclouds/glesys/features/ServerApiLiveTest.java index a56c00f3c3..81714038e6 100644 --- a/providers/glesys/src/test/java/org/jclouds/glesys/features/ServerApiLiveTest.java +++ b/providers/glesys/src/test/java/org/jclouds/glesys/features/ServerApiLiveTest.java @@ -108,7 +108,7 @@ public class ServerApiLiveTest extends BaseGleSYSApiWithAServerLiveTest { public void testListTemplates() throws Exception { FluentIterable oSTemplates = serverApi.listTemplates(); - for(OSTemplate oSTemplate : oSTemplates) { + for (OSTemplate oSTemplate : oSTemplates) { checkTemplate(oSTemplate); } } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridResponseException.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridResponseException.java index 7d1d634154..81e738f803 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridResponseException.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/GoGridResponseException.java @@ -49,7 +49,7 @@ public class GoGridResponseException extends HttpResponseException { StringBuilder builder = new StringBuilder(); builder.append(format("command %s failed with code %s. ", command.toString(), response.getStatusCode())); - for(ErrorResponse error : errors) { + for (ErrorResponse error : errors) { builder.append(format("Error [%s]: %s. ", error.getErrorCode(), error.getMessage())); } return builder.toString(); diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/IpPortPair.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/IpPortPair.java index 4c5af58842..db8791ce52 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/IpPortPair.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/IpPortPair.java @@ -125,7 +125,7 @@ public class IpPortPair implements Comparable { @Override public int compareTo(IpPortPair o) { - if(ip != null && o.getIp() != null) return Longs.compare(ip.getId(), o.getIp().getId()); + if (ip != null && o.getIp() != null) return Longs.compare(ip.getId(), o.getIp().getId()); return Ints.compare(port, o.getPort()); } } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/Job.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/Job.java index a1adcde745..faa80c8eb9 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/Job.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/Job.java @@ -276,7 +276,7 @@ public class Job implements Comparable { @Override public int compareTo(Job o) { - if(createdOn != null && o.getCreatedOn() != null) + if (createdOn != null && o.getCreatedOn() != null) return Longs.compare(createdOn.getTime(), o.getCreatedOn().getTime()); return Longs.compare(id, o.getId()); } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerOs.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerOs.java index bc94f28d66..1ad7235358 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerOs.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerOs.java @@ -29,7 +29,7 @@ public enum LoadBalancerOs { public static LoadBalancerOs fromValue(String value) { try { return valueOf(checkNotNull(value)); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerState.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerState.java index f6a86fa977..2ab8d6af6a 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerState.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerState.java @@ -42,7 +42,7 @@ public enum LoadBalancerState { public static LoadBalancerState fromValue(String state) { try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(state, "state"))); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerType.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerType.java index 13e8acff1d..1bee7c40c5 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerType.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/LoadBalancerType.java @@ -38,8 +38,8 @@ public enum LoadBalancerType { } public static LoadBalancerType fromValue(String type) { - for(LoadBalancerType persistenceType : values()) { - if(persistenceType.type.equals(checkNotNull(type))) return persistenceType; + for (LoadBalancerType persistenceType : values()) { + if (persistenceType.type.equals(checkNotNull(type))) return persistenceType; } return UNRECOGNIZED; } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ObjectType.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ObjectType.java index 729e3a8e2c..7be76f961b 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ObjectType.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ObjectType.java @@ -43,10 +43,10 @@ public enum ObjectType { } public static ObjectType fromValue(String type) { - if("StorageDNS".equals(type)) return STORAGE_DNS; + if ("StorageDNS".equals(type)) return STORAGE_DNS; try { return valueOf(CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, checkNotNull(type, "type"))); - } catch(IllegalArgumentException e) { + } catch (IllegalArgumentException e) { return UNRECOGNIZED; } } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ServerImageState.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ServerImageState.java index 618411344d..89d6667672 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ServerImageState.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ServerImageState.java @@ -39,8 +39,8 @@ public enum ServerImageState { } public static ServerImageState fromValue(String type) { - for(ServerImageState serverImageState : values()) { - if(serverImageState.type.equals(checkNotNull(type))) return serverImageState; + for (ServerImageState serverImageState : values()) { + if (serverImageState.type.equals(checkNotNull(type))) return serverImageState; } return UNRECOGNIZED; } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ServerImageType.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ServerImageType.java index 6fe5fadd3a..760fb54c21 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ServerImageType.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/domain/ServerImageType.java @@ -38,8 +38,8 @@ public enum ServerImageType { } public static ServerImageType fromValue(String type) { - for(ServerImageType serverImageType : values()) { - if(serverImageType.type.equals(checkNotNull(type))) return serverImageType; + for (ServerImageType serverImageType : values()) { + if (serverImageType.type.equals(checkNotNull(type))) return serverImageType; } return UNRECOGNIZED; } diff --git a/providers/gogrid/src/main/java/org/jclouds/gogrid/options/GetJobListOptions.java b/providers/gogrid/src/main/java/org/jclouds/gogrid/options/GetJobListOptions.java index c8ffe9923c..0a7ebfa1b8 100644 --- a/providers/gogrid/src/main/java/org/jclouds/gogrid/options/GetJobListOptions.java +++ b/providers/gogrid/src/main/java/org/jclouds/gogrid/options/GetJobListOptions.java @@ -105,7 +105,7 @@ public class GetJobListOptions extends BaseHttpRequestOptions { return new GetJobListOptions().maxItemsNumber(maxNumber); } - public static GetJobListOptions startDate(Date startDate){ + public static GetJobListOptions startDate(Date startDate) { return new GetJobListOptions().withStartDate(startDate); } diff --git a/providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderMetadata.java b/providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderMetadata.java index 1135c3e0d9..f04ca3d546 100644 --- a/providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderMetadata.java +++ b/providers/greenhousedata-element-vcloud/src/main/java/org/jclouds/greenhousedata/element/vcloud/GreenHouseDataElementVCloudProviderMetadata.java @@ -62,7 +62,7 @@ public class GreenHouseDataElementVCloudProviderMetadata extends BaseProviderMet public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("greenhousedata-element-vcloud") .name("Green House Data Element vCloud") .apiMetadata( diff --git a/providers/hpcloud-compute/src/main/java/org/jclouds/hpcloud/compute/HPCloudComputeProviderMetadata.java b/providers/hpcloud-compute/src/main/java/org/jclouds/hpcloud/compute/HPCloudComputeProviderMetadata.java index 26b2e96f5d..34b9bfa940 100644 --- a/providers/hpcloud-compute/src/main/java/org/jclouds/hpcloud/compute/HPCloudComputeProviderMetadata.java +++ b/providers/hpcloud-compute/src/main/java/org/jclouds/hpcloud/compute/HPCloudComputeProviderMetadata.java @@ -76,7 +76,7 @@ public class HPCloudComputeProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("hpcloud-compute") .name("HP Cloud Compute Services") .apiMetadata(new NovaApiMetadata().toBuilder() diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApiMetadata.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApiMetadata.java index cdfcfff844..a2027d688f 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApiMetadata.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageApiMetadata.java @@ -72,7 +72,7 @@ public class HPCloudObjectStorageApiMetadata extends SwiftKeystoneApiMetadata { public static class Builder extends SwiftKeystoneApiMetadata.Builder { @SuppressWarnings("deprecation") - protected Builder(){ + protected Builder() { super(HPCloudObjectStorageApi.class, HPCloudObjectStorageAsyncApi.class); id("hpcloud-objectstorage") .endpointName("identity service url ending in /v2.0/") diff --git a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageProviderMetadata.java b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageProviderMetadata.java index a0c4e5fc1c..687d8f043f 100644 --- a/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageProviderMetadata.java +++ b/providers/hpcloud-objectstorage/src/main/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageProviderMetadata.java @@ -56,7 +56,7 @@ public class HPCloudObjectStorageProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("hpcloud-objectstorage") .name("HP Cloud Services Object Storage") .apiMetadata(new HPCloudObjectStorageApiMetadata()) diff --git a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClientLiveTest.java b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClientLiveTest.java index 8fe0e18cec..8bebbbf368 100644 --- a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClientLiveTest.java +++ b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/HPCloudObjectStorageClientLiveTest.java @@ -37,7 +37,7 @@ import com.google.common.collect.FluentIterable; @Test(groups = "live", testName = "HPCloudObjectStorageClientLiveTest") public class HPCloudObjectStorageClientLiveTest extends CommonSwiftClientLiveTest { - public HPCloudObjectStorageClientLiveTest(){ + public HPCloudObjectStorageClientLiveTest() { provider = "hpcloud-objectstorage"; } diff --git a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/internal/BaseHPCloudObjectStorageBlobStoreExpectTest.java b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/internal/BaseHPCloudObjectStorageBlobStoreExpectTest.java index 13afc40948..73ce6da2d5 100644 --- a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/internal/BaseHPCloudObjectStorageBlobStoreExpectTest.java +++ b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/internal/BaseHPCloudObjectStorageBlobStoreExpectTest.java @@ -55,7 +55,7 @@ public class BaseHPCloudObjectStorageBlobStoreExpectTest extends BaseRestClientE return createInjector(fn, module, props).getInstance(BlobStore.class); } - @Override public ProviderMetadata createProviderMetadata(){ + @Override public ProviderMetadata createProviderMetadata() { return new HPCloudObjectStorageProviderMetadata(); } } diff --git a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/internal/KeystoneFixture.java b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/internal/KeystoneFixture.java index 56f0f26248..e07271817f 100644 --- a/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/internal/KeystoneFixture.java +++ b/providers/hpcloud-objectstorage/src/test/java/org/jclouds/hpcloud/objectstorage/internal/KeystoneFixture.java @@ -37,11 +37,11 @@ import com.google.common.net.HttpHeaders; public enum KeystoneFixture { INSTANCE; - public String getTenantName(){ + public String getTenantName() { return "12346637803162"; } - public HttpRequest initialAuthWithUsernameAndPassword(String username, String password){ + public HttpRequest initialAuthWithUsernameAndPassword(String username, String password) { return HttpRequest.builder() .method("POST") .endpoint("https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens") @@ -53,7 +53,7 @@ public enum KeystoneFixture { username, password, getTenantName()), "application/json")).build(); } - public HttpRequest initialAuthWithAccessKeyAndSecretKey(String accessKey, String secretKey){ + public HttpRequest initialAuthWithAccessKeyAndSecretKey(String accessKey, String secretKey) { return HttpRequest.builder() .method("POST") .endpoint("https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens") @@ -65,11 +65,11 @@ public enum KeystoneFixture { accessKey, secretKey, getTenantName()), "application/json")).build(); } - public String getAuthToken(){ + public String getAuthToken() { return "Auth_4f173437e4b013bee56d1007"; } - public HttpResponse responseWithAccess(){ + public HttpResponse responseWithAccess() { return HttpResponse.builder().statusCode(200).message("HTTP/1.1 200").payload( payloadFromResourceWithContentType("/keystoneAuthResponse.json", "application/json")).build(); } diff --git a/providers/ninefold-storage/src/main/java/org/jclouds/ninefold/storage/NinefoldStorageProviderMetadata.java b/providers/ninefold-storage/src/main/java/org/jclouds/ninefold/storage/NinefoldStorageProviderMetadata.java index 74ffad8a63..ff332024bd 100644 --- a/providers/ninefold-storage/src/main/java/org/jclouds/ninefold/storage/NinefoldStorageProviderMetadata.java +++ b/providers/ninefold-storage/src/main/java/org/jclouds/ninefold/storage/NinefoldStorageProviderMetadata.java @@ -55,7 +55,7 @@ public class NinefoldStorageProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("ninefold-storage") .name("Ninefold Storage") .apiMetadata(new AtmosApiMetadata()) diff --git a/providers/rackspace-cloudblockstorage-uk/src/main/java/org/jclouds/rackspace/cloudblockstorage/uk/CloudBlockStorageUKProviderMetadata.java b/providers/rackspace-cloudblockstorage-uk/src/main/java/org/jclouds/rackspace/cloudblockstorage/uk/CloudBlockStorageUKProviderMetadata.java index 5b72e79433..e00d62a8f4 100644 --- a/providers/rackspace-cloudblockstorage-uk/src/main/java/org/jclouds/rackspace/cloudblockstorage/uk/CloudBlockStorageUKProviderMetadata.java +++ b/providers/rackspace-cloudblockstorage-uk/src/main/java/org/jclouds/rackspace/cloudblockstorage/uk/CloudBlockStorageUKProviderMetadata.java @@ -71,7 +71,7 @@ public class CloudBlockStorageUKProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("rackspace-cloudblockstorage-uk") .name("Rackspace Next Generation Cloud Block Storage UK") .apiMetadata(new CinderApiMetadata().toBuilder() diff --git a/providers/rackspace-cloudblockstorage-us/src/main/java/org/jclouds/rackspace/cloudblockstorage/us/CloudBlockStorageUSProviderMetadata.java b/providers/rackspace-cloudblockstorage-us/src/main/java/org/jclouds/rackspace/cloudblockstorage/us/CloudBlockStorageUSProviderMetadata.java index 20cf897a16..ead87b8c3c 100644 --- a/providers/rackspace-cloudblockstorage-us/src/main/java/org/jclouds/rackspace/cloudblockstorage/us/CloudBlockStorageUSProviderMetadata.java +++ b/providers/rackspace-cloudblockstorage-us/src/main/java/org/jclouds/rackspace/cloudblockstorage/us/CloudBlockStorageUSProviderMetadata.java @@ -74,7 +74,7 @@ public class CloudBlockStorageUSProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("rackspace-cloudblockstorage-us") .name("Rackspace Next Generation Cloud Block Storage US") .apiMetadata(new CinderApiMetadata().toBuilder() diff --git a/providers/rackspace-clouddns-uk/src/main/java/org/jclouds/rackspace/clouddns/uk/CloudDNSUKProviderMetadata.java b/providers/rackspace-clouddns-uk/src/main/java/org/jclouds/rackspace/clouddns/uk/CloudDNSUKProviderMetadata.java index f22bf666ea..37ac77b3e9 100644 --- a/providers/rackspace-clouddns-uk/src/main/java/org/jclouds/rackspace/clouddns/uk/CloudDNSUKProviderMetadata.java +++ b/providers/rackspace-clouddns-uk/src/main/java/org/jclouds/rackspace/clouddns/uk/CloudDNSUKProviderMetadata.java @@ -54,7 +54,7 @@ public class CloudDNSUKProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("rackspace-clouddns-uk") .name("Rackspace Cloud DNS UK") .apiMetadata(new CloudDNSApiMetadata().toBuilder() diff --git a/providers/rackspace-clouddns-us/src/main/java/org/jclouds/rackspace/clouddns/us/CloudDNSUSProviderMetadata.java b/providers/rackspace-clouddns-us/src/main/java/org/jclouds/rackspace/clouddns/us/CloudDNSUSProviderMetadata.java index d5875871b4..46c412f25c 100644 --- a/providers/rackspace-clouddns-us/src/main/java/org/jclouds/rackspace/clouddns/us/CloudDNSUSProviderMetadata.java +++ b/providers/rackspace-clouddns-us/src/main/java/org/jclouds/rackspace/clouddns/us/CloudDNSUSProviderMetadata.java @@ -54,7 +54,7 @@ public class CloudDNSUSProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("rackspace-clouddns-us") .name("Rackspace Cloud DNS US") .apiMetadata(new CloudDNSApiMetadata().toBuilder() diff --git a/providers/rackspace-cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/uk/CloudLoadBalancersUKProviderMetadata.java b/providers/rackspace-cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/uk/CloudLoadBalancersUKProviderMetadata.java index 597d3b6751..d1f8934e4b 100644 --- a/providers/rackspace-cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/uk/CloudLoadBalancersUKProviderMetadata.java +++ b/providers/rackspace-cloudloadbalancers-uk/src/main/java/org/jclouds/rackspace/cloudloadbalancers/uk/CloudLoadBalancersUKProviderMetadata.java @@ -59,7 +59,7 @@ public class CloudLoadBalancersUKProviderMetadata extends BaseProviderMetadata { } public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("rackspace-cloudloadbalancers-uk") .name("Rackspace Cloud Load Balancers UK") .apiMetadata(new CloudLoadBalancersApiMetadata().toBuilder() diff --git a/providers/rackspace-cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/us/CloudLoadBalancersUSProviderMetadata.java b/providers/rackspace-cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/us/CloudLoadBalancersUSProviderMetadata.java index 3d9d40d23a..e2b2b7da92 100644 --- a/providers/rackspace-cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/us/CloudLoadBalancersUSProviderMetadata.java +++ b/providers/rackspace-cloudloadbalancers-us/src/main/java/org/jclouds/rackspace/cloudloadbalancers/us/CloudLoadBalancersUSProviderMetadata.java @@ -63,7 +63,7 @@ public class CloudLoadBalancersUSProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("rackspace-cloudloadbalancers-us") .name("Rackspace Cloud Load Balancers US") .apiMetadata(new CloudLoadBalancersApiMetadata().toBuilder() diff --git a/providers/rackspace-cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/uk/CloudServersUKProviderMetadata.java b/providers/rackspace-cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/uk/CloudServersUKProviderMetadata.java index 67b9719a91..3f1cde8a89 100644 --- a/providers/rackspace-cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/uk/CloudServersUKProviderMetadata.java +++ b/providers/rackspace-cloudservers-uk/src/main/java/org/jclouds/rackspace/cloudservers/uk/CloudServersUKProviderMetadata.java @@ -72,7 +72,7 @@ public class CloudServersUKProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("rackspace-cloudservers-uk") .name("Rackspace Next Generation Cloud Servers UK") .apiMetadata(new NovaApiMetadata().toBuilder() diff --git a/providers/rackspace-cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/us/CloudServersUSProviderMetadata.java b/providers/rackspace-cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/us/CloudServersUSProviderMetadata.java index c008847603..2c13bf83ab 100644 --- a/providers/rackspace-cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/us/CloudServersUSProviderMetadata.java +++ b/providers/rackspace-cloudservers-us/src/main/java/org/jclouds/rackspace/cloudservers/us/CloudServersUSProviderMetadata.java @@ -75,7 +75,7 @@ public class CloudServersUSProviderMetadata extends BaseProviderMetadata { public static class Builder extends BaseProviderMetadata.Builder { - protected Builder(){ + protected Builder() { id("rackspace-cloudservers-us") .name("Rackspace Next Generation Cloud Servers US") .apiMetadata(new NovaApiMetadata().toBuilder() diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/DatacenterToLocation.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/DatacenterToLocation.java index ae54cc5377..eadcecaae9 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/DatacenterToLocation.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/DatacenterToLocation.java @@ -57,7 +57,7 @@ public class DatacenterToLocation implements Function { } private Iterable createIso3166Codes(Address address) { - if (address== null) return ImmutableSet. of(); + if (address == null) return ImmutableSet. of(); final String country = nullToEmpty(address.getCountry()).trim(); if (country.isEmpty()) return ImmutableSet. of(); diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/strategy/SoftLayerComputeServiceAdapter.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/strategy/SoftLayerComputeServiceAdapter.java index aad6afbfc6..743ab3c435 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/strategy/SoftLayerComputeServiceAdapter.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/strategy/SoftLayerComputeServiceAdapter.java @@ -184,7 +184,7 @@ public class SoftLayerComputeServiceAdapter implements // cheat until we have a getProductItem command @Override public ProductItem getImage(final String id) { - return find(listImages(), new Predicate(){ + return find(listImages(), new Predicate() { @Override public boolean apply(ProductItem input) { diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Address.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Address.java index 32f0c19b4b..f4eafca3ce 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Address.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Address.java @@ -113,7 +113,7 @@ public class Address { }) protected Address(int id, String country, @Nullable String state, @Nullable String description) { this.id = id; - this.country = checkNotNull(emptyToNull(country),"country cannot be null or empty:"+country); + this.country = checkNotNull(emptyToNull(country), "country cannot be null or empty:" + country); this.state = state; this.description = description; } diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Password.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Password.java index 49c851e66e..60eabebb4d 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Password.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/Password.java @@ -100,7 +100,7 @@ public class Password { @ConstructorProperties({"id", "username", "password"}) public Password(int id, String username, @Nullable String password) { this.id = id; - this.username = checkNotNull(emptyToNull(username),"username cannot be null or empty:"+username); + this.username = checkNotNull(emptyToNull(username), "username cannot be null or empty:" + username); this.password = password; } diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/PowerState.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/PowerState.java index 6cf8643b63..5fce3884f1 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/PowerState.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/PowerState.java @@ -76,7 +76,7 @@ public class PowerState { @ConstructorProperties("keyName") public PowerState(VirtualGuest.State keyName) { - this.keyName = checkNotNull(keyName,"keyName cannot be null or empty:"+keyName); + this.keyName = checkNotNull(keyName, "keyName cannot be null or empty:" + keyName); } /** diff --git a/providers/softlayer/src/main/java/org/jclouds/softlayer/handlers/SoftLayerErrorHandler.java b/providers/softlayer/src/main/java/org/jclouds/softlayer/handlers/SoftLayerErrorHandler.java index f6459618cd..129e051041 100644 --- a/providers/softlayer/src/main/java/org/jclouds/softlayer/handlers/SoftLayerErrorHandler.java +++ b/providers/softlayer/src/main/java/org/jclouds/softlayer/handlers/SoftLayerErrorHandler.java @@ -59,7 +59,7 @@ public class SoftLayerErrorHandler implements HttpErrorHandler { } break; case 500: - if (message != null ){ + if (message != null ) { if (message.indexOf("Unable to determine package for") != -1) { exception = new ResourceNotFoundException(message, exception); } else if (message.indexOf("currently an active transaction") != -1) { diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/functions/ProductItemToImageTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/functions/ProductItemToImageTest.java index 3a6426da12..cb5f775951 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/functions/ProductItemToImageTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/compute/functions/ProductItemToImageTest.java @@ -101,7 +101,7 @@ public class ProductItemToImageTest { @Test public void testConversion() { - for( String description : operatingSystems ) + for ( String description : operatingSystems ) { ProductItem item = ProductItem.builder() .description(description) diff --git a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiLiveTest.java b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiLiveTest.java index ad9df2e7f1..1bcfe2b2ef 100644 --- a/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiLiveTest.java +++ b/providers/softlayer/src/test/java/org/jclouds/softlayer/features/DatacenterApiLiveTest.java @@ -73,9 +73,9 @@ public class DatacenterApiLiveTest extends BaseSoftLayerApiLiveTest { assertEquals(response.size(),expected.size()); assertTrue(response.containsAll(expected)); - for(Datacenter datacenter: response) { + for (Datacenter datacenter: response) { Address address = datacenter.getLocationAddress(); - if(address!=null) checkAddress(address); + if (address != null) checkAddress(address); } } @@ -87,7 +87,7 @@ public class DatacenterApiLiveTest extends BaseSoftLayerApiLiveTest { assert dc.getId() > 0 : dc; assert dc.getName() != null : dc; assert dc.getLongName() != null : dc; - for( Region region: dc.getRegions()) checkRegion(region); + for ( Region region: dc.getRegions()) checkRegion(region); } private void checkRegion(Region region) { diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/Zone.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/Zone.java index 2817ae3cbf..03b2b83b7a 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/Zone.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/Zone.java @@ -146,7 +146,7 @@ public final class Zone { } @Override - public String toString(){ + public String toString() { return this.name().toLowerCase(); } diff --git a/skeletons/standalone-compute/src/main/java/org/jclouds/servermanager/ServerManagerApiMetadata.java b/skeletons/standalone-compute/src/main/java/org/jclouds/servermanager/ServerManagerApiMetadata.java index 179aa80392..57b3ce5391 100644 --- a/skeletons/standalone-compute/src/main/java/org/jclouds/servermanager/ServerManagerApiMetadata.java +++ b/skeletons/standalone-compute/src/main/java/org/jclouds/servermanager/ServerManagerApiMetadata.java @@ -44,7 +44,7 @@ public class ServerManagerApiMetadata extends BaseApiMetadata { public static class Builder extends BaseApiMetadata.Builder { - protected Builder(){ + protected Builder() { id("servermanager") .name("ServerManager API") .identityName("Unused")