diff --git a/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java index 0e3142a96c..b9c20e5ba1 100644 --- a/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java +++ b/apis/atmos/src/main/java/org/jclouds/atmos/blobstore/AtmosAsyncBlobStore.java @@ -225,8 +225,8 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { ListenableFuture> returnVal = async.listDirectory(container, nativeOptions); ListenableFuture> list = transform(returnVal, container2ResourceList, userExecutor); - return (ListenableFuture>) (options.isDetailed() ? transform(list, - fetchBlobMetadataProvider.get().setContainerName(container)) : list); + return options.isDetailed() ? transform(list, + fetchBlobMetadataProvider.get().setContainerName(container)) : list; } /** 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 5c5e4ee469..1984bfcb2f 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 @@ -63,7 +63,7 @@ public class AtmosUtils { public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response, InputStream content) throws HttpException { - AtmosError error = (AtmosError) factory.create(errorHandlerProvider.get()).parse(content); + AtmosError error = factory.create(errorHandlerProvider.get()).parse(content); if (error.getCode() == 1032) { error.setStringSigned(signer.createStringToSign(command.getCurrentRequest())); } 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 bfad46d922..4b266140de 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 @@ -103,7 +103,7 @@ public class AtmosBlobRequestSignerTest extends BaseAsyncClientTest createParser() { - ParseSax parser = (ParseSax) factory.create(injector + ParseSax parser = factory.create(injector .getInstance(ErrorHandler.class)); return parser; } diff --git a/apis/atmos/src/test/java/org/jclouds/atmos/xml/ListDirectoryResponseHandlerTest.java b/apis/atmos/src/test/java/org/jclouds/atmos/xml/ListDirectoryResponseHandlerTest.java index 7e9b0fb297..328f38134c 100644 --- a/apis/atmos/src/test/java/org/jclouds/atmos/xml/ListDirectoryResponseHandlerTest.java +++ b/apis/atmos/src/test/java/org/jclouds/atmos/xml/ListDirectoryResponseHandlerTest.java @@ -41,7 +41,7 @@ import com.google.common.collect.Sets; public class ListDirectoryResponseHandlerTest extends BaseHandlerTest { ParseSax> createParser() { - ParseSax> parser = (ParseSax>) factory + ParseSax> parser = factory .create(injector.getInstance(ListDirectoryResponseHandler.class)); return parser; } diff --git a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/compute/extensions/CloudServersImageExtension.java b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/compute/extensions/CloudServersImageExtension.java index 826ff05b1c..4fa7bc45d4 100644 --- a/apis/cloudservers/src/main/java/org/jclouds/cloudservers/compute/extensions/CloudServersImageExtension.java +++ b/apis/cloudservers/src/main/java/org/jclouds/cloudservers/compute/extensions/CloudServersImageExtension.java @@ -48,6 +48,7 @@ import org.jclouds.logging.Logger; import com.google.common.base.Predicate; import com.google.common.base.Supplier; +import com.google.common.util.concurrent.Atomics; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.UncheckedTimeoutException; @@ -97,7 +98,7 @@ public class CloudServersImageExtension implements ImageExtension { org.jclouds.cloudservers.domain.Image csImage = client.createImageFromServer(cloneTemplate.getName(), Integer.parseInt(cloneTemplate.getSourceNodeId())); - final AtomicReference image = new AtomicReference(new ImageBuilder() + final AtomicReference image = Atomics.newReference(new ImageBuilder() .location(location.get()) .ids(csImage.getId() + "") .description(cloneTemplate.getName()) diff --git a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToServerInfoTest.java b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToServerInfoTest.java index fc5af43ae8..824dc35e0f 100644 --- a/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToServerInfoTest.java +++ b/apis/cloudsigma/src/test/java/org/jclouds/cloudsigma/functions/MapToServerInfoTest.java @@ -67,7 +67,7 @@ public class MapToServerInfoTest { "tcp/23", "tcp/25", "tcp/110", "tcp/143", "tcp/43595")).build())) .devices( ImmutableMap.of("ide:0:0", - new IDEDevice.Builder((int) 0, (int) 0).uuid("4af85ed3-0caa-4736-8a26-a33d7de0a122").build() + new IDEDevice.Builder(0, 0).uuid("4af85ed3-0caa-4736-8a26-a33d7de0a122").build() )) .metrics( @@ -95,7 +95,7 @@ public class MapToServerInfoTest { .devices( ImmutableMap.of( "ide:0:0", - new IDEDevice.Builder((int) 0, (int) 0).uuid("853bb98a-4fff-4c2f-a265-97c363f19ea5") + new IDEDevice.Builder(0, 0).uuid("853bb98a-4fff-4c2f-a265-97c363f19ea5") .mediaType(MediaType.CDROM).build())) .metrics( new ServerMetrics.Builder().driveMetrics(ImmutableMap.of("ide:0:0", new DriveMetrics.Builder().build())) @@ -143,7 +143,7 @@ public class MapToServerInfoTest { "tcp/23", "tcp/25", "tcp/110", "tcp/143", "tcp/43595")).build())) .devices( ImmutableMap.of("ide:0:0", - new IDEDevice.Builder((int) 0, (int) 0).uuid("403c9a86-0aab-4e47-aa95-e9768021c4c1").build() + new IDEDevice.Builder(0, 0).uuid("403c9a86-0aab-4e47-aa95-e9768021c4c1").build() )) .metrics( diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/EncryptedPasswordAndPrivateKey.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/EncryptedPasswordAndPrivateKey.java index 31c2a5b2d7..5baae46e62 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/EncryptedPasswordAndPrivateKey.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/domain/EncryptedPasswordAndPrivateKey.java @@ -38,7 +38,7 @@ public final class EncryptedPasswordAndPrivateKey { return builder().fromEncryptedPasswordAndPrivateKey(this); } - public final static class Builder { + public static final class Builder { protected String encryptedPassword; protected String privateKey; diff --git a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/internal/BaseCloudStackExpectTest.java b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/internal/BaseCloudStackExpectTest.java index 81c01daf62..19935fa6ed 100644 --- a/apis/cloudstack/src/test/java/org/jclouds/cloudstack/internal/BaseCloudStackExpectTest.java +++ b/apis/cloudstack/src/test/java/org/jclouds/cloudstack/internal/BaseCloudStackExpectTest.java @@ -53,7 +53,7 @@ public abstract class BaseCloudStackExpectTest extends BaseRestClientExpectTe @Override public S createClient(Function fn, Module module, Properties props) { - return (S) clientFrom(createInjector(fn, module, props).getInstance(CloudStackContext.class)); + return clientFrom(createInjector(fn, module, props).getInstance(CloudStackContext.class)); } protected abstract S clientFrom(CloudStackContext context); 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 826ad24059..aa58fb7d5a 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2ApiMetadata.java @@ -93,7 +93,7 @@ public class EC2ApiMetadata extends BaseRestApiMetadata { return properties; } - public static abstract class Builder> extends BaseRestApiMetadata.Builder { + public abstract static class Builder> extends BaseRestApiMetadata.Builder { @SuppressWarnings("deprecation") protected Builder() { this(EC2Client.class, EC2AsyncClient.class); diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/EC2Fallbacks.java b/apis/ec2/src/main/java/org/jclouds/ec2/EC2Fallbacks.java index 858206f0e1..c665e3e2f7 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/EC2Fallbacks.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/EC2Fallbacks.java @@ -50,4 +50,4 @@ public final class EC2Fallbacks { throw propagate(t); } } -} \ No newline at end of file +} diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/compute/extensions/EC2ImageExtension.java b/apis/ec2/src/main/java/org/jclouds/ec2/compute/extensions/EC2ImageExtension.java index a0f350b8cd..6686477af1 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/compute/extensions/EC2ImageExtension.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/compute/extensions/EC2ImageExtension.java @@ -55,6 +55,7 @@ import org.jclouds.logging.Logger; import com.google.common.base.Predicate; import com.google.common.base.Supplier; +import com.google.common.util.concurrent.Atomics; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.UncheckedTimeoutException; @@ -110,7 +111,7 @@ public class EC2ImageExtension implements ImageExtension { String imageId = ec2Client.getAMIServices().createImageInRegion(region, cloneTemplate.getName(), instanceId, CreateImageOptions.NONE); - final AtomicReference image = new AtomicReference(new ImageBuilder() + final AtomicReference image = Atomics.newReference(new ImageBuilder() .location(find(locations.get(), idEquals(region))) .id(region + "/" + imageId) .providerId(imageId) diff --git a/apis/ec2/src/main/java/org/jclouds/ec2/domain/Subnet.java b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Subnet.java index 5fd5510c9c..5acb38a162 100644 --- a/apis/ec2/src/main/java/org/jclouds/ec2/domain/Subnet.java +++ b/apis/ec2/src/main/java/org/jclouds/ec2/domain/Subnet.java @@ -161,7 +161,7 @@ public final class Subnet { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String subnetId; private State subnetState; private String vpcId; diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindResourceIdsToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindResourceIdsToIndexedFormParamsTest.java index 23577e002d..10c5e9ee16 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindResourceIdsToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindResourceIdsToIndexedFormParamsTest.java @@ -38,4 +38,4 @@ public class BindResourceIdsToIndexedFormParamsTest { HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://momma").build(); binder.bindToRequest(request, null); } -} \ No newline at end of file +} diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindTagsToIndexedFormParamsTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindTagsToIndexedFormParamsTest.java index fbfafd3cfb..1eb23178a2 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindTagsToIndexedFormParamsTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/binders/BindTagsToIndexedFormParamsTest.java @@ -61,4 +61,4 @@ public class BindTagsToIndexedFormParamsTest { HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://momma").build(); binder.bindToRequest(request, null); } -} \ No newline at end of file +} diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java index 88f5405e39..77878445a7 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeImagesResponseHandlerTest.java @@ -124,7 +124,7 @@ public class DescribeImagesResponseHandlerTest { } }); - ParseSax> parser = (ParseSax>) injector.getInstance(ParseSax.Factory.class).create( + ParseSax> parser = injector.getInstance(ParseSax.Factory.class).create( injector.getInstance(DescribeImagesResponseHandler.class)); return parser; } diff --git a/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java index 2faa01bf3e..4ecd68b171 100644 --- a/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java +++ b/apis/ec2/src/test/java/org/jclouds/ec2/xml/DescribeInstancesResponseHandlerTest.java @@ -162,7 +162,7 @@ public class DescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest { } }); - ParseSax>> parser = (ParseSax>>) injector + ParseSax>> parser = injector .getInstance(ParseSax.Factory.class) .create(injector.getInstance(DescribeInstancesResponseHandler.class)); return parser; diff --git a/apis/elasticstack/src/test/java/org/jclouds/elasticstack/functions/MapToServerInfoTest.java b/apis/elasticstack/src/test/java/org/jclouds/elasticstack/functions/MapToServerInfoTest.java index 4c9281601f..f03792c37a 100644 --- a/apis/elasticstack/src/test/java/org/jclouds/elasticstack/functions/MapToServerInfoTest.java +++ b/apis/elasticstack/src/test/java/org/jclouds/elasticstack/functions/MapToServerInfoTest.java @@ -67,7 +67,7 @@ public class MapToServerInfoTest { "tcp/23", "tcp/25", "tcp/110", "tcp/143", "tcp/43595")).build())) .devices( ImmutableMap.of("ide:0:0", - new IDEDevice.Builder((int) 0, (int) 0).uuid("4af85ed3-0caa-4736-8a26-a33d7de0a122").build() + new IDEDevice.Builder(0, 0).uuid("4af85ed3-0caa-4736-8a26-a33d7de0a122").build() )) .metrics( @@ -95,7 +95,7 @@ public class MapToServerInfoTest { .devices( ImmutableMap.of( "ide:0:0", - new IDEDevice.Builder((int) 0, (int) 0).uuid("853bb98a-4fff-4c2f-a265-97c363f19ea5") + new IDEDevice.Builder(0, 0).uuid("853bb98a-4fff-4c2f-a265-97c363f19ea5") .mediaType(MediaType.CDROM).build())) .metrics( new ServerMetrics.Builder().driveMetrics(ImmutableMap.of("ide:0:0", new DriveMetrics.Builder().build())) @@ -149,7 +149,7 @@ public class MapToServerInfoTest { "tcp/23", "tcp/25", "tcp/110", "tcp/143", "tcp/43595")).build())) .devices( ImmutableMap.of("ide:0:0", - new IDEDevice.Builder((int) 0, (int) 0).uuid("403c9a86-0aab-4e47-aa95-e9768021c4c1").build() + new IDEDevice.Builder(0, 0).uuid("403c9a86-0aab-4e47-aa95-e9768021c4c1").build() )) .metrics( diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/predicates/SnapshotPredicates.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/predicates/SnapshotPredicates.java index 204e211712..131bcefebc 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/predicates/SnapshotPredicates.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/predicates/SnapshotPredicates.java @@ -135,4 +135,4 @@ public class SnapshotPredicates { return snapshotApi.get(snapshot.getId()) == null; } } -} \ No newline at end of file +} diff --git a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/predicates/VolumePredicates.java b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/predicates/VolumePredicates.java index a244405ed7..5421fc3156 100644 --- a/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/predicates/VolumePredicates.java +++ b/apis/openstack-cinder/src/main/java/org/jclouds/openstack/cinder/v1/predicates/VolumePredicates.java @@ -146,4 +146,4 @@ public class VolumePredicates { return volumeApi.get(volume.getId()) == null; } } -} \ No newline at end of file +} diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApiMetadata.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApiMetadata.java index 7ddbdab18b..60ae3a2313 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApiMetadata.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneApiMetadata.java @@ -73,7 +73,7 @@ public class KeystoneApiMetadata extends BaseRestApiMetadata { return properties; } - public static abstract class Builder> extends BaseRestApiMetadata.Builder { + public abstract static class Builder> extends BaseRestApiMetadata.Builder { @SuppressWarnings("deprecation") protected Builder() { this(KeystoneApi.class, KeystoneAsyncApi.class); diff --git a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneFallbacks.java b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneFallbacks.java index 098c858b2e..8df5719285 100644 --- a/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneFallbacks.java +++ b/apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/KeystoneFallbacks.java @@ -48,4 +48,4 @@ public final class KeystoneFallbacks { } } -} \ No newline at end of file +} diff --git a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/config/ProviderModuleExpectTest.java b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/config/ProviderModuleExpectTest.java index 7cbc64db5b..159e901367 100644 --- a/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/config/ProviderModuleExpectTest.java +++ b/apis/openstack-keystone/src/test/java/org/jclouds/openstack/keystone/v2_0/config/ProviderModuleExpectTest.java @@ -178,4 +178,4 @@ public class ProviderModuleExpectTest extends BaseRestApiExpectTest R bindToRequest(R request, Map postParams) { return bindToRequest(request, (Object) ImmutableMap.of("keypair", ImmutableSortedMap.copyOf(postParams))); } -} \ No newline at end of file +} diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/extensions/NovaImageExtension.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/extensions/NovaImageExtension.java index 524f074447..1e7cb6d72e 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/extensions/NovaImageExtension.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/extensions/NovaImageExtension.java @@ -53,6 +53,7 @@ import org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId; import com.google.common.base.Predicate; import com.google.common.base.Supplier; +import com.google.common.util.concurrent.Atomics; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.UncheckedTimeoutException; @@ -109,7 +110,7 @@ public class NovaImageExtension implements ImageExtension { logger.info(">> Registered new Image %s, waiting for it to become available.", newImageId); - final AtomicReference image = new AtomicReference(new ImageBuilder() + final AtomicReference image = Atomics.newReference(new ImageBuilder() .location(find(locations.get(), idEquals(targetImageZoneAndId.getZone()))) .id(targetImageZoneAndId.slashEncode()) .providerId(targetImageZoneAndId.getId()) diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/ServerCreated.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/ServerCreated.java index 20be1148f7..5699028401 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/ServerCreated.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/domain/ServerCreated.java @@ -47,7 +47,7 @@ public class ServerCreated extends Resource { return builder().fromServerCreated(this); } - public final static class Builder extends Resource.Builder { + public static final class Builder extends Resource.Builder { protected String adminPass; /** diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java index cefa3a6283..4ad2a983ad 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApi.java @@ -86,4 +86,4 @@ public interface VolumeAttachmentApi { * @return true if successful */ boolean detachVolumeFromServer(String volumeId, String serverId); -} \ No newline at end of file +} diff --git a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/functions/OverLimitParser.java b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/functions/OverLimitParser.java index 85567e12ea..fe2debdfc3 100644 --- a/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/functions/OverLimitParser.java +++ b/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/functions/OverLimitParser.java @@ -91,4 +91,4 @@ public class OverLimitParser implements Function> { return ImmutableMap.of(); } } -} \ No newline at end of file +} diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiExpectTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiExpectTest.java index 8e4f63d0c2..d015e80f15 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiExpectTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiExpectTest.java @@ -167,4 +167,4 @@ public class VolumeAttachmentApiExpectTest extends BaseNovaApiExpectTest { protected VolumeAttachment testAttachment() { return VolumeAttachment.builder().device("/dev/vdc").serverId("b4785058-cb80-491b-baa3-e4ee6546450e").id("1").volumeId("1").build(); } -} \ No newline at end of file +} diff --git a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java index 21b42f187c..608bffd987 100644 --- a/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java +++ b/apis/openstack-nova/src/test/java/org/jclouds/openstack/nova/v2_0/extensions/VolumeAttachmentApiLiveTest.java @@ -155,4 +155,4 @@ public class VolumeAttachmentApiLiveTest extends BaseNovaApiLiveTest { } } -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/SessionPersistence.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/SessionPersistence.java index 650e6cbcd2..ca6158920a 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/SessionPersistence.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/SessionPersistence.java @@ -30,4 +30,4 @@ public enum SessionPersistence { return UNRECOGNIZED; } } -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/AccessRuleApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/AccessRuleApi.java index c8db030330..e1acfff515 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/AccessRuleApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/AccessRuleApi.java @@ -109,4 +109,4 @@ public interface AccessRuleApi { @Path("/accesslist") @Consumes("*/*") boolean deleteAll(); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ConnectionApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ConnectionApi.java index cca0298760..d0300edcb4 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ConnectionApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ConnectionApi.java @@ -118,4 +118,4 @@ public interface ConnectionApi { @Payload("{\"connectionLogging\":{\"enabled\":false}}") @Path("/connectionlogging") void disableConnectionLogging(); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ContentCachingApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ContentCachingApi.java index 63f315e1a3..7a24e76f69 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ContentCachingApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ContentCachingApi.java @@ -81,4 +81,4 @@ public interface ContentCachingApi { @Payload("{\"contentCaching\":{\"enabled\":false}}") @Path("/contentcaching") void disable(); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ErrorPageApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ErrorPageApi.java index a55129e12a..cb4cb853ac 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ErrorPageApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ErrorPageApi.java @@ -81,4 +81,4 @@ public interface ErrorPageApi { @Fallback(FalseOnNotFoundOr404.class) @Path("/errorpage") boolean delete(); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/HealthMonitorApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/HealthMonitorApi.java index d3b581d7dc..78f1107377 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/HealthMonitorApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/HealthMonitorApi.java @@ -83,4 +83,4 @@ public interface HealthMonitorApi { @Path("/healthmonitor") @Consumes("*/*") boolean delete(); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ReportApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ReportApi.java index 0222ae7e5b..4d98d0e332 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ReportApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/ReportApi.java @@ -167,4 +167,4 @@ public interface ReportApi { @Fallback(NullOnNotFoundOr404.class) @Path("/loadbalancers/algorithms") Iterable listAlgorithms(); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SSLTerminationApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SSLTerminationApi.java index 2d995e3f62..041a82b99e 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SSLTerminationApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SSLTerminationApi.java @@ -116,4 +116,4 @@ public interface SSLTerminationApi { @Path("/ssltermination") @Consumes("*/*") boolean delete(); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SessionPersistenceApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SessionPersistenceApi.java index 7a013ec415..2a9205025b 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SessionPersistenceApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/SessionPersistenceApi.java @@ -86,4 +86,4 @@ public interface SessionPersistenceApi { @Fallback(VoidOnNotFoundOr404.class) @Path("/sessionpersistence") void delete(); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/VirtualIPApi.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/VirtualIPApi.java index a1fcdb51c1..b1aad88dad 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/VirtualIPApi.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/VirtualIPApi.java @@ -102,4 +102,4 @@ public interface VirtualIPApi { @Path("/virtualips") @Consumes("*/*") boolean delete(@QueryParam("id") Iterable ids); -} \ No newline at end of file +} diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/predicates/LoadBalancerPredicates.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/predicates/LoadBalancerPredicates.java index a87fe699db..61d07e8e71 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/predicates/LoadBalancerPredicates.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/predicates/LoadBalancerPredicates.java @@ -135,4 +135,4 @@ public class LoadBalancerPredicates { } } } -} \ No newline at end of file +} diff --git a/apis/route53/src/main/java/org/jclouds/route53/domain/ChangeBatch.java b/apis/route53/src/main/java/org/jclouds/route53/domain/ChangeBatch.java index 36bff55e37..bc41055ce7 100644 --- a/apis/route53/src/main/java/org/jclouds/route53/domain/ChangeBatch.java +++ b/apis/route53/src/main/java/org/jclouds/route53/domain/ChangeBatch.java @@ -133,7 +133,7 @@ public class ChangeBatch extends ForwardingList { return new Builder(); } - public final static class Builder { + public static final class Builder { private Optional comment = Optional.absent(); private ImmutableList.Builder changes = ImmutableList.builder(); diff --git a/apis/route53/src/main/java/org/jclouds/route53/domain/HostedZone.java b/apis/route53/src/main/java/org/jclouds/route53/domain/HostedZone.java index 635e8f3f9d..698ceac8aa 100644 --- a/apis/route53/src/main/java/org/jclouds/route53/domain/HostedZone.java +++ b/apis/route53/src/main/java/org/jclouds/route53/domain/HostedZone.java @@ -108,7 +108,7 @@ public final class HostedZone { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String id; private String name; private String callerReference; diff --git a/apis/route53/src/main/java/org/jclouds/route53/domain/ResourceRecordSet.java b/apis/route53/src/main/java/org/jclouds/route53/domain/ResourceRecordSet.java index a8c03489b7..1468a1ba72 100644 --- a/apis/route53/src/main/java/org/jclouds/route53/domain/ResourceRecordSet.java +++ b/apis/route53/src/main/java/org/jclouds/route53/domain/ResourceRecordSet.java @@ -95,7 +95,7 @@ public class ResourceRecordSet { /** * A portion of a RRs who share the same name and type */ - public static abstract class RecordSubset extends ResourceRecordSet { + public abstract static class RecordSubset extends ResourceRecordSet { public static final class Weighted extends RecordSubset { private final int weight; @@ -261,7 +261,7 @@ public class ResourceRecordSet { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String id; private String name; private String type; 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 884030c4e8..1406423005 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3ApiMetadata.java @@ -94,7 +94,7 @@ public class S3ApiMetadata extends BaseRestApiMetadata { return properties; } - public static abstract class Builder> extends BaseRestApiMetadata.Builder { + public abstract static class Builder> extends BaseRestApiMetadata.Builder { @SuppressWarnings("deprecation") protected Builder() { this(S3Client.class, S3AsyncClient.class); diff --git a/apis/s3/src/main/java/org/jclouds/s3/S3Fallbacks.java b/apis/s3/src/main/java/org/jclouds/s3/S3Fallbacks.java index d8ea756a6b..a69fca3def 100644 --- a/apis/s3/src/main/java/org/jclouds/s3/S3Fallbacks.java +++ b/apis/s3/src/main/java/org/jclouds/s3/S3Fallbacks.java @@ -51,4 +51,4 @@ public final class S3Fallbacks { throw propagate(t); } } -} \ No newline at end of file +} diff --git a/apis/s3/src/test/java/org/jclouds/s3/xml/AccessControlListHandlerTest.java b/apis/s3/src/test/java/org/jclouds/s3/xml/AccessControlListHandlerTest.java index 869b5d4d47..5ea8dd1d3f 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/xml/AccessControlListHandlerTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/xml/AccessControlListHandlerTest.java @@ -42,7 +42,7 @@ public class AccessControlListHandlerTest extends BaseHandlerTest { public static final String aclExtreme = "1a405254c932b52e5b5caaa88186bc431a1bacb9ece631f835daddaf0c47677cjamesmurtyhttp://acs.amazonaws.com/groups/global/AuthenticatedUsersWRITEhttp://acs.amazonaws.com/groups/global/AuthenticatedUsersREAD_ACP1a405254c932b52e5b5caaa88186bc431a1bacb9ece631f835daddaf0c47677cjamesmurtyWRITEhttp://acs.amazonaws.com/groups/global/AuthenticatedUsersWRITE_ACPhttp://acs.amazonaws.com/groups/global/AllUsersREADhttp://acs.amazonaws.com/groups/global/AuthenticatedUsersREADhttp://acs.amazonaws.com/groups/s3/LogDeliveryWRITE1a405254c932b52e5b5caaa88186bc431a1bacb9ece631f835daddaf0c47677cjamesmurtyREAD1a405254c932b52e5b5caaa88186bc431a1bacb9ece631f835daddaf0c47677cjamesmurtyFULL_CONTROL"; ParseSax createParser() { - ParseSax parser = (ParseSax) factory.create(injector + ParseSax parser = factory.create(injector .getInstance(AccessControlListHandler.class)); return parser; } diff --git a/apis/s3/src/test/java/org/jclouds/s3/xml/CopyObjectHandlerTest.java b/apis/s3/src/test/java/org/jclouds/s3/xml/CopyObjectHandlerTest.java index 1346092484..4bc28de1a7 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/xml/CopyObjectHandlerTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/xml/CopyObjectHandlerTest.java @@ -55,7 +55,7 @@ public class CopyObjectHandlerTest extends BaseHandlerTest { .iso8601DateParse("2009-03-19T13:23:27.000Z"), "\"92836a3ea45a6984d1b4d23a747d46bb\""); - ObjectMetadata result = (ObjectMetadata) factory.create( + ObjectMetadata result = factory.create( injector.getInstance(CopyObjectHandler.class)).parse(is); assertEquals(result, expected); diff --git a/apis/s3/src/test/java/org/jclouds/s3/xml/PayerHandlerTest.java b/apis/s3/src/test/java/org/jclouds/s3/xml/PayerHandlerTest.java index d5d3894570..ab84b0e49d 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/xml/PayerHandlerTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/xml/PayerHandlerTest.java @@ -37,7 +37,7 @@ import org.testng.annotations.Test; public class PayerHandlerTest extends BaseHandlerTest { ParseSax createParser() { - ParseSax parser = (ParseSax) factory.create(injector + ParseSax parser = factory.create(injector .getInstance(PayerHandler.class)); return parser; } diff --git a/apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java b/apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java index 44e24fc4a7..bd05f9f79c 100644 --- a/apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java +++ b/apis/s3/src/test/java/org/jclouds/s3/xml/S3ParserTest.java @@ -139,7 +139,7 @@ public class S3ParserTest extends PerformanceTest { } private ListBucketResponse runParseListContainerResult() throws HttpException { - return (ListBucketResponse) factory.create(injector.getInstance(ListBucketHandler.class)).setContext( + return factory.create(injector.getInstance(ListBucketHandler.class)).setContext( HttpRequest.builder().method("GET").endpoint("http://bucket.com").build()).parse( Strings2.toInputStream(listContainerResult)); } @@ -147,7 +147,7 @@ public class S3ParserTest extends PerformanceTest { public static final String successfulCopyObject200 = "2009-03-19T13:23:27.000Z\"92836a3ea45a6984d1b4d23a747d46bb\""; private ObjectMetadata runParseCopyObjectResult() throws HttpException { - return (ObjectMetadata) factory.create(injector.getInstance(CopyObjectHandler.class)).parse( + return factory.create(injector.getInstance(CopyObjectHandler.class)).parse( Strings2.toInputStream(successfulCopyObject200)); } diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/binders/BindChangeMessageVisibilityBatchRequestEntryToIndexedFormParams.java b/apis/sqs/src/main/java/org/jclouds/sqs/binders/BindChangeMessageVisibilityBatchRequestEntryToIndexedFormParams.java index 1a722aa84c..d65fe98edf 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/binders/BindChangeMessageVisibilityBatchRequestEntryToIndexedFormParams.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/binders/BindChangeMessageVisibilityBatchRequestEntryToIndexedFormParams.java @@ -42,7 +42,7 @@ public class BindChangeMessageVisibilityBatchRequestEntryToIndexedFormParams ext } public Map idReceiptHandle(Iterable input) { - return Maps.uniqueIndex((Iterable) input, new Function() { + return Maps.uniqueIndex(input, new Function() { int index = 1; @Override diff --git a/apis/sqs/src/main/java/org/jclouds/sqs/binders/BindSendMessageBatchRequestEntryWithDelaysToIndexedFormParams.java b/apis/sqs/src/main/java/org/jclouds/sqs/binders/BindSendMessageBatchRequestEntryWithDelaysToIndexedFormParams.java index 0727a47989..3954f4f733 100644 --- a/apis/sqs/src/main/java/org/jclouds/sqs/binders/BindSendMessageBatchRequestEntryWithDelaysToIndexedFormParams.java +++ b/apis/sqs/src/main/java/org/jclouds/sqs/binders/BindSendMessageBatchRequestEntryWithDelaysToIndexedFormParams.java @@ -41,7 +41,7 @@ public class BindSendMessageBatchRequestEntryWithDelaysToIndexedFormParams exten } public Map idMessageBody(Iterable input) { - return Maps.uniqueIndex((Iterable) input, new Function() { + return Maps.uniqueIndex(input, new Function() { int index = 1; @Override diff --git a/apis/sts/src/main/java/org/jclouds/aws/domain/SessionCredentials.java b/apis/sts/src/main/java/org/jclouds/aws/domain/SessionCredentials.java index 4dc1f13a9e..0a727c8395 100644 --- a/apis/sts/src/main/java/org/jclouds/aws/domain/SessionCredentials.java +++ b/apis/sts/src/main/java/org/jclouds/aws/domain/SessionCredentials.java @@ -109,7 +109,7 @@ public final class SessionCredentials extends Credentials { return builder().from(this); } - public final static class Builder extends Credentials.Builder { + public static final class Builder extends Credentials.Builder { private String accessKeyId; private String secretAccessKey; private String sessionToken; diff --git a/apis/sts/src/main/java/org/jclouds/aws/filters/FormSigner.java b/apis/sts/src/main/java/org/jclouds/aws/filters/FormSigner.java index 713f440033..10e80b9dc1 100644 --- a/apis/sts/src/main/java/org/jclouds/aws/filters/FormSigner.java +++ b/apis/sts/src/main/java/org/jclouds/aws/filters/FormSigner.java @@ -26,7 +26,8 @@ import static com.google.common.io.BaseEncoding.base64; import static com.google.common.io.ByteStreams.readBytes; import static org.jclouds.aws.reference.FormParameters.ACTION; import static org.jclouds.aws.reference.FormParameters.AWS_ACCESS_KEY_ID; -import static org.jclouds.aws.reference.FormParameters.*; +import static org.jclouds.aws.reference.FormParameters.SECURITY_TOKEN; +import static org.jclouds.aws.reference.FormParameters.SIGNATURE; import static org.jclouds.aws.reference.FormParameters.SIGNATURE_METHOD; import static org.jclouds.aws.reference.FormParameters.SIGNATURE_VERSION; import static org.jclouds.aws.reference.FormParameters.TIMESTAMP; diff --git a/apis/sts/src/main/java/org/jclouds/sts/domain/UserAndSessionCredentials.java b/apis/sts/src/main/java/org/jclouds/sts/domain/UserAndSessionCredentials.java index 3207826a91..517b73fe77 100644 --- a/apis/sts/src/main/java/org/jclouds/sts/domain/UserAndSessionCredentials.java +++ b/apis/sts/src/main/java/org/jclouds/sts/domain/UserAndSessionCredentials.java @@ -37,7 +37,7 @@ public final class UserAndSessionCredentials { return builder().from(this); } - public final static class Builder { + public static final class Builder { private User user; private SessionCredentials credentials; private int packedPolicySize; diff --git a/apis/sts/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java b/apis/sts/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java index af992566b1..6c4384c6e4 100644 --- a/apis/sts/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java +++ b/apis/sts/src/test/java/org/jclouds/aws/xml/ErrorHandlerTest.java @@ -38,7 +38,7 @@ public class ErrorHandlerTest extends BaseHandlerTest { public static final String errorFromAmazonIfYouDontRemoveTransferEncodingHeader = "NotImplementedA header you provided implies functionality that is not implemented
Transfer-Encoding
7C59925D75D15561fbskVU51OZJg2yZS/wNIxoE2PmCf0ZqFd0iH6Vrzw0uKG3KmokswBytL/Bfp/GWb
"; ParseSax createParser() { - ParseSax parser = (ParseSax) factory.create(injector.getInstance(ErrorHandler.class)); + ParseSax parser = factory.create(injector.getInstance(ErrorHandler.class)); return parser; } 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 78c16ee208..c3e131c730 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 @@ -78,7 +78,7 @@ public class SwiftApiMetadata extends BaseRestApiMetadata { return properties; } - public static abstract class Builder> extends BaseRestApiMetadata.Builder { + public abstract static class Builder> extends BaseRestApiMetadata.Builder { @SuppressWarnings("deprecation") protected Builder() { this(SwiftClient.class, SwiftAsyncClient.class); diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java index 8c556575cb..a35844641e 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/SwiftKeystoneApiMetadata.java @@ -75,7 +75,7 @@ public class SwiftKeystoneApiMetadata extends SwiftApiMetadata { return properties; } - public static abstract class Builder> extends SwiftApiMetadata.Builder { + public abstract static class Builder> extends SwiftApiMetadata.Builder { protected Builder() { this(SwiftKeystoneClient.class, SwiftKeystoneAsyncClient.class); } diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java index b974021099..66e291469a 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java @@ -74,7 +74,7 @@ public class MultipartUploadSlicingAlgorithm { long unitPartSize = defaultPartSize; // first try with default part size int parts = (int)(length / unitPartSize); long partSize = unitPartSize; - int magnitude = (int) (parts / magnitudeBase); + int magnitude = parts / magnitudeBase; if (magnitude > 0) { partSize = magnitude * unitPartSize; if (partSize > MultipartUpload.MAX_PART_SIZE) { diff --git a/apis/swift/src/main/java/org/jclouds/openstack/swift/options/CreateContainerOptions.java b/apis/swift/src/main/java/org/jclouds/openstack/swift/options/CreateContainerOptions.java index 671d130d46..7dc60253f4 100644 --- a/apis/swift/src/main/java/org/jclouds/openstack/swift/options/CreateContainerOptions.java +++ b/apis/swift/src/main/java/org/jclouds/openstack/swift/options/CreateContainerOptions.java @@ -68,7 +68,7 @@ public class CreateContainerOptions extends BaseHttpRequestOptions { public static CreateContainerOptions withMetadata(Map metadata) { CreateContainerOptions options = new CreateContainerOptions(); - return (CreateContainerOptions) options.withMetadata(metadata); + return options.withMetadata(metadata); } } diff --git a/apis/swift/src/test/java/org/jclouds/openstack/swift/internal/BasePayloadTest.java b/apis/swift/src/test/java/org/jclouds/openstack/swift/internal/BasePayloadTest.java index 93001c826f..d44cb78d30 100644 --- a/apis/swift/src/test/java/org/jclouds/openstack/swift/internal/BasePayloadTest.java +++ b/apis/swift/src/test/java/org/jclouds/openstack/swift/internal/BasePayloadTest.java @@ -53,4 +53,4 @@ public class BasePayloadTest { throw Throwables.propagate(e); } } -} \ No newline at end of file +} diff --git a/apis/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java b/apis/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java index 3f66142453..6e1ef796fd 100644 --- a/apis/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java +++ b/apis/vcloud/src/main/java/org/jclouds/vcloud/util/VCloudUtils.java @@ -59,7 +59,7 @@ public class VCloudUtils { String contentType = response.getPayload().getContentMetadata().getContentType(); if (contentType != null && contentType.startsWith(VCloudMediaType.ERROR_XML)) { try { - return (VCloudError) factory.create(errorHandlerProvider.get()).setContext(request).apply(response); + return factory.create(errorHandlerProvider.get()).setContext(request).apply(response); } catch (RuntimeException e) { logger.warn(e, "error parsing error"); } diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/internal/BasePayloadTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/internal/BasePayloadTest.java index 92f5b12cf2..0131c8aee7 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/internal/BasePayloadTest.java +++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/internal/BasePayloadTest.java @@ -50,4 +50,4 @@ public class BasePayloadTest { throw Throwables.propagate(e); } } -} \ No newline at end of file +} diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java index a242513378..d11ce931a4 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java +++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/CatalogHandlerTest.java @@ -55,7 +55,7 @@ public class CatalogHandlerTest { InputStream is = getClass().getResourceAsStream("/catalog-blank.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); - Catalog result = (Catalog) factory.create(injector.getInstance(CatalogHandler.class)).parse(is); + Catalog result = factory.create(injector.getInstance(CatalogHandler.class)).parse(is); assertEquals(result, new CatalogImpl("Jclouds-private", "application/vnd.vmware.vcloud.catalog+xml", URI .create("https://vcenterprise.bluelock.com/api/v1.0/catalog/921222081"), new ReferenceTypeImpl(null, "application/vnd.vmware.vcloud.org+xml", URI @@ -67,7 +67,7 @@ public class CatalogHandlerTest { InputStream is = getClass().getResourceAsStream("/catalog.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); - Catalog result = (Catalog) factory.create(injector.getInstance(CatalogHandler.class)).parse(is); + Catalog result = factory.create(injector.getInstance(CatalogHandler.class)).parse(is); assertEquals(result.getName(), "Miami Environment 1"); assert result.getDescription() == null; diff --git a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java b/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java index b07c6c1a52..91df05148e 100644 --- a/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java +++ b/apis/vcloud/src/test/java/org/jclouds/vcloud/xml/OrgHandlerTest.java @@ -55,7 +55,7 @@ public class OrgHandlerTest { Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); - Org result = (Org) factory.create(injector.getInstance(OrgHandler.class)).parse(is); + Org result = factory.create(injector.getInstance(OrgHandler.class)).parse(is); assertEquals(result.getName(), "ExampleOrg"); assertEquals(result.getFullName(), "ExampleOrg"); assertEquals(result.getDescription(), "Example Corp's Primary Organization."); @@ -80,7 +80,7 @@ public class OrgHandlerTest { Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); - Org result = (Org) factory.create(injector.getInstance(OrgHandler.class)).parse(is); + Org result = factory.create(injector.getInstance(OrgHandler.class)).parse(is); assertEquals(result.getName(), "adrian@jclouds.org"); assertEquals(result.getFullName(), "adrian@jclouds.org"); assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/org/48")); @@ -98,7 +98,7 @@ public class OrgHandlerTest { InputStream is = getClass().getResourceAsStream("/org-hosting.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); - Org result = (Org) factory.create(injector.getInstance(OrgHandler.class)).parse(is); + Org result = factory.create(injector.getInstance(OrgHandler.class)).parse(is); assertEquals(result.getName(), "Customer 188849"); assertEquals(result.getFullName(), "Customer 188849"); assertEquals(result.getHref(), URI.create("https://vcloud.safesecureweb.com/api/v0.8/org/188849")); @@ -115,7 +115,7 @@ public class OrgHandlerTest { InputStream is = getClass().getResourceAsStream("/org-savvis.xml"); Injector injector = Guice.createInjector(new SaxParserModule()); Factory factory = injector.getInstance(ParseSax.Factory.class); - Org result = (Org) factory.create(injector.getInstance(OrgHandler.class)).parse(is); + Org result = factory.create(injector.getInstance(OrgHandler.class)).parse(is); assertEquals(result, new OrgImpl("607968.0", null, null, "607968.0", "Gravitant Inc", ImmutableMap . of(), ImmutableMap. of("GravDataCenter1(Saved)", new ReferenceTypeImpl("GravDataCenter1(Saved)", "application/vnd.vmware.vcloud.vdc+xml", URI diff --git a/blobstore/src/test/java/org/jclouds/blobstore/TransientBlobRequestSignerTest.java b/blobstore/src/test/java/org/jclouds/blobstore/TransientBlobRequestSignerTest.java index 1f883f643d..88389e7774 100644 --- a/blobstore/src/test/java/org/jclouds/blobstore/TransientBlobRequestSignerTest.java +++ b/blobstore/src/test/java/org/jclouds/blobstore/TransientBlobRequestSignerTest.java @@ -83,7 +83,7 @@ public class TransientBlobRequestSignerTest extends BaseAsyncClientTest createParser() { - ParseSax parser = (ParseSax) factory.create(injector + ParseSax parser = factory.create(injector .getInstance(ErrorHandler.class)); return parser; } diff --git a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/TerremarkVCloudFallbacks.java b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/TerremarkVCloudFallbacks.java index 3bf8aa6e8d..b42cd46ed3 100644 --- a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/TerremarkVCloudFallbacks.java +++ b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/TerremarkVCloudFallbacks.java @@ -63,4 +63,4 @@ public final class TerremarkVCloudFallbacks { } } -} \ No newline at end of file +} diff --git a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/options/InstantiateVAppTemplateOptions.java b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/options/InstantiateVAppTemplateOptions.java index f9da0c6d79..0df915bdab 100644 --- a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/options/InstantiateVAppTemplateOptions.java +++ b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/options/InstantiateVAppTemplateOptions.java @@ -403,7 +403,7 @@ public class InstantiateVAppTemplateOptions { */ public static InstantiateVAppTemplateOptions productProperty(String key, String value) { InstantiateVAppTemplateOptions options = new InstantiateVAppTemplateOptions(); - return (InstantiateVAppTemplateOptions) options.productProperty(key, value); + return options.productProperty(key, value); } /** @@ -412,7 +412,7 @@ public class InstantiateVAppTemplateOptions { */ public static InstantiateVAppTemplateOptions productProperties(Map properties) { InstantiateVAppTemplateOptions options = new InstantiateVAppTemplateOptions(); - return (InstantiateVAppTemplateOptions) options.productProperties(properties); + return options.productProperties(properties); } } diff --git a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/util/VCloudUtils.java b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/util/VCloudUtils.java index 94a053c364..43fbd58e1e 100644 --- a/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/util/VCloudUtils.java +++ b/common/trmk/src/main/java/org/jclouds/trmk/vcloud_0_8/util/VCloudUtils.java @@ -56,7 +56,7 @@ public class VCloudUtils { return null; if (TerremarkVCloudMediaType.ERROR_XML.equals(response.getPayload().getContentMetadata().getContentType())) { try { - return (VCloudError) factory.create(errorHandlerProvider.get()).setContext(request).apply(response); + return factory.create(errorHandlerProvider.get()).setContext(request).apply(response); } catch (RuntimeException e) { logger.warn(e, "error parsing error"); } diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/internal/BasePayloadTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/internal/BasePayloadTest.java index a0a6198ecc..d0aafebe59 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/internal/BasePayloadTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/internal/BasePayloadTest.java @@ -39,4 +39,4 @@ public class BasePayloadTest { throw Throwables.propagate(e); } } -} \ No newline at end of file +} diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CatalogHandlerTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CatalogHandlerTest.java index 0288a5246a..0a2aee2931 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CatalogHandlerTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CatalogHandlerTest.java @@ -50,7 +50,7 @@ public class CatalogHandlerTest { InputStream is = getClass().getResourceAsStream("/catalog.xml"); injector = Guice.createInjector(new SaxParserModule()); factory = injector.getInstance(ParseSax.Factory.class); - Catalog result = (Catalog) factory.create(injector.getInstance(CatalogHandler.class)).parse(is); + Catalog result = factory.create(injector.getInstance(CatalogHandler.class)).parse(is); assertEquals(result.getName(), "Miami Environment 1"); assert result.getDescription() == null; diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CatalogItemHandlerTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CatalogItemHandlerTest.java index 7fb74cf3be..0b3e3c0749 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CatalogItemHandlerTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CatalogItemHandlerTest.java @@ -64,7 +64,7 @@ public class CatalogItemHandlerTest extends BaseHandlerTest { InputStream is = getClass().getResourceAsStream("/catalogItem-terremark.xml"); - CatalogItem result = (CatalogItem) factory.create( + CatalogItem result = factory.create( injector.getInstance(CatalogItemHandler.class)).parse(is); assertEquals( result, diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CustomizationParametersHandlerTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CustomizationParametersHandlerTest.java index be250ed3bc..f7b2d9ecfd 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CustomizationParametersHandlerTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/CustomizationParametersHandlerTest.java @@ -40,7 +40,7 @@ public class CustomizationParametersHandlerTest extends BaseHandlerTest { InputStream is = getClass().getResourceAsStream( "/CustomizationParameters.xml"); - CustomizationParameters result = (CustomizationParameters) factory + CustomizationParameters result = factory .create(injector.getInstance(CustomizationParametersHandler.class)) .parse(is); assertEquals(result, new CustomizationParameters(true, false, false)); diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/InternetServiceHandlerTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/InternetServiceHandlerTest.java index b0af2ba8f3..671dad3d80 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/InternetServiceHandlerTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/InternetServiceHandlerTest.java @@ -49,7 +49,7 @@ public class InternetServiceHandlerTest extends BaseHandlerTest { public void test1() throws UnknownHostException { InputStream is = getClass().getResourceAsStream("/InternetService.xml"); - InternetService result = (InternetService) factory.create(injector.getInstance(InternetServiceHandler.class)) + InternetService result = factory.create(injector.getInstance(InternetServiceHandler.class)) .parse(is); assertEquals(result, new InternetService("IS_for_Jim", null, new PublicIpAddress("10.1.22.159", null), 80, Protocol.HTTP, false, 1, "Some test service")); @@ -58,7 +58,7 @@ public class InternetServiceHandlerTest extends BaseHandlerTest { public void test2() throws UnknownHostException { InputStream is = getClass().getResourceAsStream("/InternetService2.xml"); - InternetService result = (InternetService) factory.create(injector.getInstance(InternetServiceHandler.class)) + InternetService result = factory.create(injector.getInstance(InternetServiceHandler.class)) .parse(is); assertEquals(result, new InternetService("IS_for_Jim2", URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/InternetServices/524"), new PublicIpAddress( diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/NodeHandlerTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/NodeHandlerTest.java index e84715edb8..7612c16a66 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/NodeHandlerTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/NodeHandlerTest.java @@ -40,7 +40,7 @@ public class NodeHandlerTest extends BaseHandlerTest { public void test1() throws UnknownHostException { InputStream is = getClass().getResourceAsStream("/NodeService.xml"); - Node result = (Node) factory.create(injector.getInstance(NodeHandler.class)).parse(is); + Node result = factory.create(injector.getInstance(NodeHandler.class)).parse(is); assertEquals(result, new Node("Node for Jim", URI .create("https://services.vcloudexpress.terremark.com/api/v0.8/NodeServices/242"), "172.16.20.3", 80, false, "Some test node")); diff --git a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/VAppHandlerTest.java b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/VAppHandlerTest.java index b43b80c623..61ba55c1dd 100644 --- a/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/VAppHandlerTest.java +++ b/common/trmk/src/test/java/org/jclouds/trmk/vcloud_0_8/xml/VAppHandlerTest.java @@ -78,7 +78,7 @@ public class VAppHandlerTest extends BaseHandlerTest { public void testApplyInputStream() { InputStream is = getClass().getResourceAsStream("/launched_vapp.xml"); - VApp result = (VApp) factory.create( + VApp result = factory.create( injector.getInstance(VAppHandler.class)).parse(is); assertEquals(result.getName(), "adriantest"); @@ -95,7 +95,7 @@ public class VAppHandlerTest extends BaseHandlerTest { public void testGetVApp() throws UnknownHostException { InputStream is = getClass().getResourceAsStream("/get_vapp.xml"); - VApp result = (VApp) factory.create( + VApp result = factory.create( injector.getInstance(VAppHandler.class)).parse(is); assertEquals(result.getName(), "centos-53"); diff --git a/compute/src/main/java/org/jclouds/compute/domain/OsFamily.java b/compute/src/main/java/org/jclouds/compute/domain/OsFamily.java index 7dd52d7b9a..ccd9ed9347 100644 --- a/compute/src/main/java/org/jclouds/compute/domain/OsFamily.java +++ b/compute/src/main/java/org/jclouds/compute/domain/OsFamily.java @@ -20,7 +20,8 @@ package org.jclouds.compute.domain; import static com.google.common.base.Preconditions.checkNotNull; -import static com.google.common.base.CaseFormat.*; +import static com.google.common.base.CaseFormat.LOWER_HYPHEN; +import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE; /** * Running Operating system diff --git a/compute/src/main/java/org/jclouds/compute/functions/Sha512Crypt.java b/compute/src/main/java/org/jclouds/compute/functions/Sha512Crypt.java index dc4ec53bce..b367241c20 100644 --- a/compute/src/main/java/org/jclouds/compute/functions/Sha512Crypt.java +++ b/compute/src/main/java/org/jclouds/compute/functions/Sha512Crypt.java @@ -335,7 +335,7 @@ public class Sha512Crypt { StringBuilder result = new StringBuilder(); while (--size >= 0) { - result.append(itoa64.charAt((int) (v & 0x3f))); + result.append(itoa64.charAt(v & 0x3f)); v >>>= 6; } diff --git a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java index 8df2929621..67e18a7ec1 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java @@ -585,7 +585,7 @@ public abstract class BaseComputeServiceLiveTest extends BaseComputeServiceConte assert node.getLocation() != null : node; assertEquals(node.getType(), ComputeType.NODE); assert node instanceof NodeMetadata; - NodeMetadata nodeMetadata = (NodeMetadata) node; + NodeMetadata nodeMetadata = node; assert nodeMetadata.getProviderId() != null : nodeMetadata; // nullable // assert nodeMetadata.getImage() != null : node; diff --git a/core/src/main/java/org/jclouds/Fallback.java b/core/src/main/java/org/jclouds/Fallback.java index 1af2b71ead..f42180f16b 100644 --- a/core/src/main/java/org/jclouds/Fallback.java +++ b/core/src/main/java/org/jclouds/Fallback.java @@ -42,4 +42,4 @@ public interface Fallback extends FutureFallback { * the exception that made the call fail. */ V createOrPropagate(Throwable t) throws Exception; -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/Fallbacks.java b/core/src/main/java/org/jclouds/Fallbacks.java index f8479076d4..22d2e86652 100644 --- a/core/src/main/java/org/jclouds/Fallbacks.java +++ b/core/src/main/java/org/jclouds/Fallbacks.java @@ -204,4 +204,4 @@ public final class Fallbacks { return getFirstThrowableOfType(from, ResourceNotFoundException.class) != null; } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java b/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java index a86b0189ce..5de83aa8a8 100644 --- a/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java +++ b/core/src/main/java/org/jclouds/apis/internal/BaseApiMetadata.java @@ -77,7 +77,7 @@ public abstract class BaseApiMetadata implements ApiMetadata { return props; } - public static abstract class Builder> implements ApiMetadata.Builder { + public abstract static class Builder> implements ApiMetadata.Builder { protected abstract T self(); private String id; diff --git a/core/src/main/java/org/jclouds/collect/IterableWithMarkers.java b/core/src/main/java/org/jclouds/collect/IterableWithMarkers.java index 9b8eabf8b8..fd5667634a 100644 --- a/core/src/main/java/org/jclouds/collect/IterableWithMarkers.java +++ b/core/src/main/java/org/jclouds/collect/IterableWithMarkers.java @@ -88,7 +88,7 @@ public class IterableWithMarkers { } } - private static abstract class ForwardingIterableWithMarker extends IterableWithMarker { + private abstract static class ForwardingIterableWithMarker extends IterableWithMarker { protected abstract IterableWithMarker delegate(); diff --git a/core/src/main/java/org/jclouds/collect/internal/Arg0ToPagedIterable.java b/core/src/main/java/org/jclouds/collect/internal/Arg0ToPagedIterable.java index 1352b7de44..4deaec7873 100644 --- a/core/src/main/java/org/jclouds/collect/internal/Arg0ToPagedIterable.java +++ b/core/src/main/java/org/jclouds/collect/internal/Arg0ToPagedIterable.java @@ -97,7 +97,7 @@ public abstract class Arg0ToPagedIterable * * @author Adrian Cole */ - public static abstract class FromCaller> extends Arg0ToPagedIterable { + public abstract static class FromCaller> extends Arg0ToPagedIterable { @Override protected List getArgs(GeneratedHttpRequest request) { return request.getCaller().get().getArgs(); diff --git a/core/src/main/java/org/jclouds/concurrent/config/WithSubmissionTrace.java b/core/src/main/java/org/jclouds/concurrent/config/WithSubmissionTrace.java index 7f9ed35fff..8225266c70 100644 --- a/core/src/main/java/org/jclouds/concurrent/config/WithSubmissionTrace.java +++ b/core/src/main/java/org/jclouds/concurrent/config/WithSubmissionTrace.java @@ -113,7 +113,7 @@ public class WithSubmissionTrace { } } - private final static Set stackTracesToTrim = ImmutableSet.of(WithSubmissionTrace.class.getName(), + private static final Set stackTracesToTrim = ImmutableSet.of(WithSubmissionTrace.class.getName(), ListeningExecutorService.class.getName(), ListenableFuture.class.getName(), ListeningScheduledExecutorService.class.getName(), ScheduledFuture.class.getName()); diff --git a/core/src/main/java/org/jclouds/fallbacks/HeaderToRetryAfterException.java b/core/src/main/java/org/jclouds/fallbacks/HeaderToRetryAfterException.java index 06f77a31d9..7c5fa021c4 100644 --- a/core/src/main/java/org/jclouds/fallbacks/HeaderToRetryAfterException.java +++ b/core/src/main/java/org/jclouds/fallbacks/HeaderToRetryAfterException.java @@ -123,4 +123,4 @@ public final class HeaderToRetryAfterException implements PropagateIfRetryAfter return Optional.absent(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/fallbacks/PropagateIfRetryAfter.java b/core/src/main/java/org/jclouds/fallbacks/PropagateIfRetryAfter.java index dc5c4cdf4d..e4048caa2d 100644 --- a/core/src/main/java/org/jclouds/fallbacks/PropagateIfRetryAfter.java +++ b/core/src/main/java/org/jclouds/fallbacks/PropagateIfRetryAfter.java @@ -37,4 +37,4 @@ public interface PropagateIfRetryAfter extends FutureFallback { @Override ListenableFuture create(Throwable t); -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/http/HttpResponseException.java b/core/src/main/java/org/jclouds/http/HttpResponseException.java index 111674ec67..8fd88f7545 100644 --- a/core/src/main/java/org/jclouds/http/HttpResponseException.java +++ b/core/src/main/java/org/jclouds/http/HttpResponseException.java @@ -77,7 +77,7 @@ public class HttpResponseException extends RuntimeException { public HttpResponseException(HttpCommand command, HttpResponse response) { this(String.format("request: %s %sfailed with response: %s", command.getCurrentRequest().getRequestLine(), - requestPayloadIfStringOrFormIfNotReturnEmptyString((HttpRequest) command.getCurrentRequest()), + requestPayloadIfStringOrFormIfNotReturnEmptyString(command.getCurrentRequest()), response.getStatusLine()), command, response); } diff --git a/core/src/main/java/org/jclouds/http/UriTemplates.java b/core/src/main/java/org/jclouds/http/UriTemplates.java index 7e554400e6..c818cc608d 100644 --- a/core/src/main/java/org/jclouds/http/UriTemplates.java +++ b/core/src/main/java/org/jclouds/http/UriTemplates.java @@ -18,7 +18,7 @@ */ package org.jclouds.http; -import static com.google.common.base.Preconditions.*; +import static com.google.common.base.Preconditions.checkNotNull; import java.util.Map; @@ -72,4 +72,4 @@ public class UriTemplates { } return builder.toString(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactory.java b/core/src/main/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactory.java index f1aa29c6cd..212460daf2 100644 --- a/core/src/main/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactory.java +++ b/core/src/main/java/org/jclouds/json/internal/DeserializationConstructorAndReflectiveTypeAdapterFactory.java @@ -214,7 +214,7 @@ public final class DeserializationConstructorAndReflectiveTypeAdapterFactory imp private T newInstance(Object[] ctorParams) throws AssertionError { try { - return (T) parameterizedCtor.invoke(null, ctorParams); + return parameterizedCtor.invoke(null, ctorParams); } catch (IllegalAccessException e) { throw new AssertionError(e); } catch (InvocationTargetException e) { diff --git a/core/src/main/java/org/jclouds/json/internal/NamingStrategies.java b/core/src/main/java/org/jclouds/json/internal/NamingStrategies.java index 94975e437d..07298638aa 100644 --- a/core/src/main/java/org/jclouds/json/internal/NamingStrategies.java +++ b/core/src/main/java/org/jclouds/json/internal/NamingStrategies.java @@ -199,7 +199,7 @@ public class NamingStrategies { /** * Determines field naming from constructor annotations */ - public final static class AnnotationConstructorNamingStrategy extends AnnotationBasedNamingStrategy { + public static final class AnnotationConstructorNamingStrategy extends AnnotationBasedNamingStrategy { private final Predicate> hasMarker; private final Collection> markers; diff --git a/core/src/main/java/org/jclouds/proxy/ProxyConfig.java b/core/src/main/java/org/jclouds/proxy/ProxyConfig.java index c13a1692a4..14e6d3d27c 100644 --- a/core/src/main/java/org/jclouds/proxy/ProxyConfig.java +++ b/core/src/main/java/org/jclouds/proxy/ProxyConfig.java @@ -59,4 +59,4 @@ public interface ProxyConfig { */ Optional getCredentials(); -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/reflect/FunctionalReflection.java b/core/src/main/java/org/jclouds/reflect/FunctionalReflection.java index 4e96983ba2..f7a5bbd89f 100644 --- a/core/src/main/java/org/jclouds/reflect/FunctionalReflection.java +++ b/core/src/main/java/org/jclouds/reflect/FunctionalReflection.java @@ -144,4 +144,4 @@ public final class FunctionalReflection { return invocationFunction.toString(); } } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/reflect/Reflection2.java b/core/src/main/java/org/jclouds/reflect/Reflection2.java index 767f071e3c..f265d44558 100644 --- a/core/src/main/java/org/jclouds/reflect/Reflection2.java +++ b/core/src/main/java/org/jclouds/reflect/Reflection2.java @@ -289,7 +289,9 @@ public class Reflection2 { if (raw == Object.class) continue; for (Method method : raw.getDeclaredMethods()) { - method.setAccessible(true); + if (!coreJavaClass(raw)) { + method.setAccessible(true); + } builder.add(key.method(method)); } } @@ -297,6 +299,17 @@ public class Reflection2 { } }); + private static boolean coreJavaClass(Class clazz) { + // treat null packages (e.g. for proxy objects) as "non-core" + Package clazzPackage = clazz.getPackage(); + if (clazzPackage == null) { + return false; + } + String packageName = clazzPackage.getName(); + return packageName.startsWith("com.sun.") || packageName.startsWith("java.") + || packageName.startsWith("javax.") || packageName.startsWith("sun."); + } + /** * ensures that exceptions are not doubly-wrapped */ @@ -309,4 +322,4 @@ public class Reflection2 { throw propagate(e.getCause()); } } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/reflect/Types2.java b/core/src/main/java/org/jclouds/reflect/Types2.java index c900d3dee7..7f1e07b776 100644 --- a/core/src/main/java/org/jclouds/reflect/Types2.java +++ b/core/src/main/java/org/jclouds/reflect/Types2.java @@ -42,4 +42,4 @@ public class Types2 { "unbound type variable: %s, use ctor that explicitly assigns this", type); return type; } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java b/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java index 429c62a647..39e9161974 100644 --- a/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java +++ b/core/src/main/java/org/jclouds/rest/config/InvocationConfig.java @@ -52,4 +52,4 @@ public interface InvocationConfig { * fallback used for Sync or Async commands. */ Fallback getFallback(Invocation invocation); -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java b/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java index 3fc2176917..d47341e590 100644 --- a/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java +++ b/core/src/main/java/org/jclouds/rest/config/ReadAnnotationsAndProperties.java @@ -115,4 +115,4 @@ public class ReadAnnotationsAndProperties implements InvocationConfig { } }); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/rest/config/SyncToAsyncHttpInvocationModule.java b/core/src/main/java/org/jclouds/rest/config/SyncToAsyncHttpInvocationModule.java index 81f85191a3..0f7a614e0b 100644 --- a/core/src/main/java/org/jclouds/rest/config/SyncToAsyncHttpInvocationModule.java +++ b/core/src/main/java/org/jclouds/rest/config/SyncToAsyncHttpInvocationModule.java @@ -147,4 +147,4 @@ public class SyncToAsyncHttpInvocationModule extends AbstractModule { } }), Class.class); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/rest/internal/BaseHttpApiMetadata.java b/core/src/main/java/org/jclouds/rest/internal/BaseHttpApiMetadata.java index cbc0ef3021..65c04c2f6a 100644 --- a/core/src/main/java/org/jclouds/rest/internal/BaseHttpApiMetadata.java +++ b/core/src/main/java/org/jclouds/rest/internal/BaseHttpApiMetadata.java @@ -61,7 +61,7 @@ public abstract class BaseHttpApiMetadata extends BaseApiMetadata implements }, apiToken); } - public static abstract class Builder> extends BaseApiMetadata.Builder implements + public abstract static class Builder> extends BaseApiMetadata.Builder implements HttpApiMetadata.Builder { protected Class api; diff --git a/core/src/main/java/org/jclouds/rest/internal/BaseRestApiMetadata.java b/core/src/main/java/org/jclouds/rest/internal/BaseRestApiMetadata.java index c10efb5c3f..e5d7546edd 100644 --- a/core/src/main/java/org/jclouds/rest/internal/BaseRestApiMetadata.java +++ b/core/src/main/java/org/jclouds/rest/internal/BaseRestApiMetadata.java @@ -64,7 +64,7 @@ public abstract class BaseRestApiMetadata extends BaseApiMetadata implements Res }, asyncApiToken); } - public static abstract class Builder> extends BaseApiMetadata.Builder implements RestApiMetadata.Builder { + public abstract static class Builder> extends BaseApiMetadata.Builder implements RestApiMetadata.Builder { protected Class api; protected Class asyncApi; diff --git a/core/src/main/java/org/jclouds/rest/internal/DelegatesToInvocationFunction.java b/core/src/main/java/org/jclouds/rest/internal/DelegatesToInvocationFunction.java index f0a1055008..3b6bb85809 100644 --- a/core/src/main/java/org/jclouds/rest/internal/DelegatesToInvocationFunction.java +++ b/core/src/main/java/org/jclouds/rest/internal/DelegatesToInvocationFunction.java @@ -272,4 +272,4 @@ public class DelegatesToInvocationFunction { + public static final class Builder extends HttpRequest.Builder { private Invocation invocation; private Optional caller = Optional.absent(); diff --git a/core/src/main/java/org/jclouds/rest/internal/GetAcceptHeaders.java b/core/src/main/java/org/jclouds/rest/internal/GetAcceptHeaders.java index b1ef21977c..0d595b251b 100644 --- a/core/src/main/java/org/jclouds/rest/internal/GetAcceptHeaders.java +++ b/core/src/main/java/org/jclouds/rest/internal/GetAcceptHeaders.java @@ -36,4 +36,4 @@ class GetAcceptHeaders implements Function> { Optional.fromNullable(invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Consumes.class))); return (accept.isPresent()) ? ImmutableSet.copyOf(accept.get().value()) : ImmutableSet. of(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/rest/internal/InvokeHttpMethod.java b/core/src/main/java/org/jclouds/rest/internal/InvokeHttpMethod.java index 7a358ddc08..b94177fc1b 100644 --- a/core/src/main/java/org/jclouds/rest/internal/InvokeHttpMethod.java +++ b/core/src/main/java/org/jclouds/rest/internal/InvokeHttpMethod.java @@ -223,4 +223,4 @@ public class InvokeHttpMethod implements Function { public String toString() { return Objects.toStringHelper("").omitNullValues().add("annotationParser", annotationProcessor).toString(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/rest/internal/InvokeSyncToAsyncHttpMethod.java b/core/src/main/java/org/jclouds/rest/internal/InvokeSyncToAsyncHttpMethod.java index c63f90a6dc..b4ceb6f542 100644 --- a/core/src/main/java/org/jclouds/rest/internal/InvokeSyncToAsyncHttpMethod.java +++ b/core/src/main/java/org/jclouds/rest/internal/InvokeSyncToAsyncHttpMethod.java @@ -274,4 +274,4 @@ public class InvokeSyncToAsyncHttpMethod implements Function public String toString() { return Objects.toStringHelper("").omitNullValues().add("annotationParser", annotationProcessor).toString(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java b/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java index 05b3677101..b0d37e032c 100644 --- a/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java +++ b/core/src/main/java/org/jclouds/rest/internal/RestAnnotationProcessor.java @@ -572,8 +572,8 @@ public class RestAnnotationProcessor implements Function { */ protected ApiMetadata createApiMetadata() { try { - return (ApiMetadata) Apis.withId(provider); + return Apis.withId(provider); } catch (NoSuchElementException e) { return null; } @@ -124,7 +124,7 @@ public abstract class BaseContextLiveTest { protected ContextBuilder newBuilder() { if (provider != null) try { - return (ContextBuilder) ContextBuilder.newBuilder(provider); + return ContextBuilder.newBuilder(provider); } catch (NoSuchElementException e){ Logger.getAnonymousLogger() .warning("provider [" diff --git a/core/src/test/java/org/jclouds/collect/internal/Arg0ToPagedIterableTest.java b/core/src/test/java/org/jclouds/collect/internal/Arg0ToPagedIterableTest.java index 1e50546f06..83d12d4c60 100644 --- a/core/src/test/java/org/jclouds/collect/internal/Arg0ToPagedIterableTest.java +++ b/core/src/test/java/org/jclouds/collect/internal/Arg0ToPagedIterableTest.java @@ -41,7 +41,7 @@ import com.google.common.reflect.Invokable; @Test(testName = "Arg0ToPagedIterableTest") public class Arg0ToPagedIterableTest { - private static abstract class TestArg0 extends Arg0ToPagedIterable { + private abstract static class TestArg0 extends Arg0ToPagedIterable { private TestArg0(GeneratedHttpRequest in) { this.setContext(in); } @@ -112,7 +112,7 @@ public class Arg0ToPagedIterableTest { } } - private static abstract class TestCallerArg0 extends Arg0ToPagedIterable.FromCaller { + private abstract static class TestCallerArg0 extends Arg0ToPagedIterable.FromCaller { private TestCallerArg0(GeneratedHttpRequest in) { this.setContext(in); } diff --git a/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java b/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java new file mode 100644 index 0000000000..7fca3da199 --- /dev/null +++ b/core/src/test/java/org/jclouds/reflect/Reflection2CoreJavaClassesTest.java @@ -0,0 +1,89 @@ +/** + * Licensed to jclouds, Inc. (jclouds) under one or more + * contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. jclouds licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.jclouds.reflect; + +import static org.easymock.EasyMock.createNiceMock; +import static org.easymock.EasyMock.expectLastCall; +import static org.easymock.EasyMock.replay; +import static org.jclouds.reflect.Reflection2.methods; + +import java.lang.reflect.Method; +import java.lang.reflect.ReflectPermission; + +import org.easymock.IAnswer; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Test; + +/** + * Tests {@link Reflection2#methods()} on core Java classes where + * reflective access may be limited by a {@link SecurityManager}. + * + * This test has been separated out into a separate class as it modifies + * a system-wide setting (the {@code SecurityManager}) and needs to perform + * cleanup to avoid affecting other tests. + * + * @author Andrew Phillips + */ +@Test(singleThreaded = true) +public class Reflection2CoreJavaClassesTest { + private SecurityManager originalSecurityManager; + private boolean securityManagerOverridden = false; + + @BeforeClass + public void backupSecurityManager() { + originalSecurityManager = System.getSecurityManager(); + } + + public void testCoreJavaMethodsNotMadeAccessible(final Method testMethod) { + // a nice mock is required because plenty of other checks will be made + SecurityManager mockSecurityManager = createNiceMock(SecurityManager.class); + // clunky way of failing if the following method is ever called + mockSecurityManager.checkPermission(new ReflectPermission("suppressAccessChecks")); + expectLastCall().andStubAnswer(new IAnswer() { + @Override + public Void answer() throws Throwable { + try { + // generate a stacktrace + throw new Exception(); + } catch(Exception exception) { + // fail *only* if being called from this test + for (StackTraceElement element : exception.getStackTrace()) { + if (element.getMethodName().equals(testMethod.getName())) { + throw new AssertionError("checkPermission(new ReflectPermission(\"suppressAccessChecks\")) should not be called"); + } + } + } + return null; + } + }); + replay(mockSecurityManager); + System.setSecurityManager(mockSecurityManager); + securityManagerOverridden = true; + methods(Enum.class); + } + + @AfterClass(alwaysRun = true) + public void restoreSecurityManager() { + // will only be true if we have permission to set the SecurityManager + if (securityManagerOverridden) { + System.setSecurityManager(originalSecurityManager); + } + } +} diff --git a/core/src/test/java/org/jclouds/util/Throwables2Test.java b/core/src/test/java/org/jclouds/util/Throwables2Test.java index 15497a7982..32ad9aeb15 100644 --- a/core/src/test/java/org/jclouds/util/Throwables2Test.java +++ b/core/src/test/java/org/jclouds/util/Throwables2Test.java @@ -134,7 +134,7 @@ public class Throwables2Test { public void testGetFirstThrowableOfTypeOuterTransformParallel() { Exception aex = createMock(AuthorizationException.class); TransformParallelException pex = new TransformParallelException(ImmutableMap.> of(), - ImmutableMap.of("bad", (Exception) aex), "test"); + ImmutableMap.of("bad", aex), "test"); assertEquals(getFirstThrowableOfType(new ExecutionException(pex), AuthorizationException.class), aex); } diff --git a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java index 49f03252dc..2e32dff494 100644 --- a/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java +++ b/drivers/jsch/src/main/java/org/jclouds/ssh/jsch/SessionConnection.java @@ -42,7 +42,7 @@ public final class SessionConnection implements Connection { return new Builder(); } - public final static class Builder { + public static final class Builder { private HostAndPort hostAndPort; private LoginCredentials loginCredentials; diff --git a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/xml/AWSDescribeInstancesResponseHandlerTest.java b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/xml/AWSDescribeInstancesResponseHandlerTest.java index 10ddc1c8fe..47cebbf7b6 100644 --- a/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/xml/AWSDescribeInstancesResponseHandlerTest.java +++ b/providers/aws-ec2/src/test/java/org/jclouds/aws/ec2/xml/AWSDescribeInstancesResponseHandlerTest.java @@ -156,7 +156,7 @@ public class AWSDescribeInstancesResponseHandlerTest extends BaseEC2HandlerTest } }); - ParseSax>> parser = (ParseSax>>) injector + ParseSax>> parser = injector .getInstance(ParseSax.Factory.class) .create(injector.getInstance(AWSDescribeInstancesResponseHandler.class)); return parser; diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java index 7df0448583..e557065a41 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/MultipartUploadSlicingAlgorithm.java @@ -75,7 +75,7 @@ public class MultipartUploadSlicingAlgorithm { long unitPartSize = defaultPartSize; // first try with default part size int parts = (int)(length / unitPartSize); long partSize = unitPartSize; - int magnitude = (int) (parts / magnitudeBase); + int magnitude = parts / magnitudeBase; if (magnitude > 0) { partSize = magnitude * unitPartSize; if (partSize > MultipartUpload.MAX_PART_SIZE) { diff --git a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/ParallelMultipartUploadStrategy.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/ParallelMultipartUploadStrategy.java index 3cb76bdb7e..1540c68518 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/ParallelMultipartUploadStrategy.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/ParallelMultipartUploadStrategy.java @@ -166,7 +166,7 @@ public class ParallelMultipartUploadStrategy implements AsyncMultipartUploadStra long chunkSize = algorithm.getChunkSize(); long remaining = algorithm.getRemaining(); if (parts > 0) { - AWSS3Client client = (AWSS3Client) ablobstore + AWSS3Client client = ablobstore .getContext().unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi(); String uploadId = null; final Map> futureParts = diff --git a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientLiveTest.java b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientLiveTest.java index d204aaf7fe..7fbf1e8c17 100644 --- a/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientLiveTest.java +++ b/providers/aws-s3/src/test/java/org/jclouds/aws/s3/AWSS3ClientLiveTest.java @@ -83,7 +83,7 @@ public class AWSS3ClientLiveTest extends S3ClientLiveTest { @Override public AWSS3Client getApi() { - return (AWSS3Client) view.unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi(); + return view.unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi(); } @BeforeClass(groups = { "integration", "live" }) diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/options/CreateContainerOptions.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/options/CreateContainerOptions.java index d2d4fcbdf2..875a47dc43 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/options/CreateContainerOptions.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/options/CreateContainerOptions.java @@ -72,7 +72,7 @@ public class CreateContainerOptions extends CreateOptions { */ public static CreateContainerOptions withMetadata(Multimap metadata) { CreateContainerOptions options = new CreateContainerOptions(); - return (CreateContainerOptions) options.withMetadata(metadata); + return options.withMetadata(metadata); } } 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 b7047b547b..b1caf34ccf 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 @@ -98,7 +98,7 @@ public class AzureBlobRequestSignerTest extends BaseAsyncClientTest list = new BoundedHashSet(contents, URI .create("http://myaccount.blob.core.windows.net/"), null, null, 3, "video"); - BoundedSet result = (BoundedSet) factory.create( + BoundedSet result = factory.create( injector.getInstance(AccountNameEnumerationResultsHandler.class)).parse(is); assertEquals(result, list); @@ -96,7 +96,7 @@ public class AccountNameEnumerationResultsHandlerTest extends BaseHandlerTest { InputStream is = getClass().getResourceAsStream("/test_list_containers_options.xml"); BoundedSet list = new BoundedHashSet(contents, URI .create("http://myaccount.blob.core.windows.net"), "prefix", "marker", 1, "video"); - BoundedSet result = (BoundedSet) factory.create( + BoundedSet result = factory.create( injector.getInstance(AccountNameEnumerationResultsHandler.class)).parse(is); assertEquals(result, list); } diff --git a/providers/azureblob/src/test/java/org/jclouds/azureblob/xml/ContainerNameEnumerationResultsHandlerTest.java b/providers/azureblob/src/test/java/org/jclouds/azureblob/xml/ContainerNameEnumerationResultsHandlerTest.java index d6925a5ed4..398af5ff86 100644 --- a/providers/azureblob/src/test/java/org/jclouds/azureblob/xml/ContainerNameEnumerationResultsHandlerTest.java +++ b/providers/azureblob/src/test/java/org/jclouds/azureblob/xml/ContainerNameEnumerationResultsHandlerTest.java @@ -80,7 +80,7 @@ public class ContainerNameEnumerationResultsHandlerTest extends BaseHandlerTest URI.create("http://myaccount.blob.core.windows.net/mycontainer"), "myfolder/", null, 4, "newblob2.txt", null, ImmutableSet. of("myfolder/")); - ListBlobsResponse result = (ListBlobsResponse) factory.create( + ListBlobsResponse result = factory.create( injector.getInstance(ContainerNameEnumerationResultsHandler.class)).parse(is); assertEquals(result, list); @@ -99,7 +99,7 @@ public class ContainerNameEnumerationResultsHandlerTest extends BaseHandlerTest null, null, 1, "2!68!MDAwMDA2IWFwcGxlcyEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiE-", "/", Sets. newTreeSet()); - ListBlobsResponse result = (ListBlobsResponse) factory.create( + ListBlobsResponse result = factory.create( injector.getInstance(ContainerNameEnumerationResultsHandler.class)).parse(is); assertEquals(result, list); diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/DynECTApi.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/DynECTApi.java index 19119f4f38..a3fdaa6e4f 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/DynECTApi.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/DynECTApi.java @@ -83,4 +83,4 @@ public interface DynECTApi extends Closeable { */ @Delegate RecordApi getRecordApiForZone(@PathParam("zone") String zone); -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/DynECTExceptions.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/DynECTExceptions.java index ed0d2eff03..a7a70a0d2b 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/DynECTExceptions.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/DynECTExceptions.java @@ -46,4 +46,4 @@ public interface DynECTExceptions { super(message, cause); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/binders/RecordIdBinder.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/binders/RecordIdBinder.java index e2ed0fe70c..700753f2b5 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/binders/RecordIdBinder.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/binders/RecordIdBinder.java @@ -42,4 +42,4 @@ public class RecordIdBinder implements Binder { .put("id", valueToAppend.getId()).build()); return (R) request.toBuilder().endpoint(path).build(); } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/config/DynECTHttpApiModule.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/config/DynECTHttpApiModule.java index a20c5ef97c..127076f0cc 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/config/DynECTHttpApiModule.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/config/DynECTHttpApiModule.java @@ -118,7 +118,7 @@ public class DynECTHttpApiModule extends HttpApiModule { * synchronized to prevent multiple callers from overlapping requests on the same session */ @Override - synchronized protected HttpResponse invoke(HttpURLConnection connection) throws IOException, InterruptedException { + protected synchronized HttpResponse invoke(HttpURLConnection connection) throws IOException, InterruptedException { HttpResponse response = super.invoke(connection); if (response.getStatusCode() == 200) { byte[] data = closeClientButKeepContentStream(response); diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/CreatePrimaryZone.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/CreatePrimaryZone.java index 69a1594f8a..82ebf1bed9 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/CreatePrimaryZone.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/CreatePrimaryZone.java @@ -106,7 +106,7 @@ public final class CreatePrimaryZone { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String fqdn; private String contact; private int defaultTTL = 3600; @@ -158,4 +158,4 @@ public final class CreatePrimaryZone { return CreatePrimaryZone.class.cast(in).getFQDN(); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/CreateRecord.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/CreateRecord.java index 58081f728d..6033af1848 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/CreateRecord.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/CreateRecord.java @@ -155,4 +155,4 @@ public class CreateRecord> { return fqdn(in.getFQDN()).type(in.getType()).ttl(in.getTTL()).rdata(in.getRData()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/Record.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/Record.java index 438ae289f2..5e91784aa0 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/Record.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/Record.java @@ -114,4 +114,4 @@ public class Record> extends RecordId { return this; } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/RecordId.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/RecordId.java index a69f4cd5cb..2f54f99040 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/RecordId.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/RecordId.java @@ -163,4 +163,4 @@ public class RecordId { return this; } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/SOARecord.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/SOARecord.java index ec8593a786..1f79c3338a 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/SOARecord.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/SOARecord.java @@ -66,7 +66,7 @@ public final class SOARecord extends Record { return builder().from(this); } - public final static class Builder extends Record.Builder { + public static final class Builder extends Record.Builder { private SerialStyle serialStyle; @@ -96,4 +96,4 @@ public final class SOARecord extends Record { return this; } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/SessionCredentials.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/SessionCredentials.java index 87489a3c6a..5f7b90cdd2 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/SessionCredentials.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/SessionCredentials.java @@ -26,7 +26,7 @@ public final class SessionCredentials extends Credentials { return builder().from(this); } - public final static class Builder extends Credentials.Builder { + public static final class Builder extends Credentials.Builder { private String customerName; private String userName; private String password; diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/Zone.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/Zone.java index 9d064ecad7..1bf35f7417 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/Zone.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/Zone.java @@ -156,7 +156,7 @@ public final class Zone { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String fqdn; private Type type; private int serial; @@ -202,4 +202,4 @@ public final class Zone { return this.fqdn(in.fqdn).type(in.type).serial(in.serial).serialStyle(in.serialStyle); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/AAAAData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/AAAAData.java index f297481453..24ca847f76 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/AAAAData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/AAAAData.java @@ -73,7 +73,7 @@ public class AAAAData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String address; /** @@ -92,4 +92,4 @@ public class AAAAData extends ForwardingMap { return this.address(in.getAddress()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/AData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/AData.java index 6ecd18d186..8df245ed4d 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/AData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/AData.java @@ -74,7 +74,7 @@ public class AData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String address; /** @@ -93,4 +93,4 @@ public class AData extends ForwardingMap { return this.address(in.getAddress()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/CNAMEData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/CNAMEData.java index 33709ecc0b..294c831437 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/CNAMEData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/CNAMEData.java @@ -75,7 +75,7 @@ public class CNAMEData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String cname; /** @@ -94,4 +94,4 @@ public class CNAMEData extends ForwardingMap { return this.cname(in.getCname()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/MXData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/MXData.java index f6104a3353..b28e120648 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/MXData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/MXData.java @@ -89,7 +89,7 @@ public class MXData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private int preference = -1; private String exchange; @@ -117,4 +117,4 @@ public class MXData extends ForwardingMap { return this.preference(in.getPreference()).exchange(in.getExchange()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/NSData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/NSData.java index 73e2c3415f..d2d92a0246 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/NSData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/NSData.java @@ -75,7 +75,7 @@ public class NSData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String nsdname; /** @@ -94,4 +94,4 @@ public class NSData extends ForwardingMap { return this.nsdname(in.getNsdname()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/PTRData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/PTRData.java index 2abdd2ea27..84a68b49b7 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/PTRData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/PTRData.java @@ -74,7 +74,7 @@ public class PTRData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String ptrdname; /** @@ -93,4 +93,4 @@ public class PTRData extends ForwardingMap { return this.ptrdname(in.getPtrdname()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SOAData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SOAData.java index 3a5dd30722..42d13345a5 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SOAData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SOAData.java @@ -145,7 +145,7 @@ public class SOAData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String mname; private String rname; private int serial = -1; @@ -219,4 +219,4 @@ public class SOAData extends ForwardingMap { .expire(in.getExpire()).minimum(in.getMinimum()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SRVData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SRVData.java index 9fd5c2f7c4..85b20c0581 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SRVData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SRVData.java @@ -113,7 +113,7 @@ public class SRVData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private int priority = -1; private int weight = -1; private int port = -1; @@ -159,4 +159,4 @@ public class SRVData extends ForwardingMap { return this.priority(in.getPriority()).weight(in.getWeight()).port(in.getPort()).target(in.getTarget()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SSHFPData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SSHFPData.java index abc051f5f9..b7c6982c2d 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SSHFPData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/SSHFPData.java @@ -85,7 +85,7 @@ public class SSHFPData extends ForwardingMap { return fingerprint; } - public final static class Builder { + public static final class Builder { private int algorithm; private int fptype; private String fingerprint; diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/TXTData.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/TXTData.java index 0113f41fc2..29fb56ae38 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/TXTData.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/TXTData.java @@ -74,7 +74,7 @@ public class TXTData extends ForwardingMap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String txtdata; /** @@ -93,4 +93,4 @@ public class TXTData extends ForwardingMap { return this.txtdata(in.getTxtdata()); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/RecordApi.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/RecordApi.java index e026a41136..91360dcc24 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/RecordApi.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/RecordApi.java @@ -379,4 +379,4 @@ public interface RecordApi { @Nullable Record getTXT(@PathParam("fqdn") String fqdn, @PathParam("id") long recordId) throws JobStillRunningException; -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/SessionApi.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/SessionApi.java index ce0505b2df..8a0ca01ec3 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/SessionApi.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/SessionApi.java @@ -60,4 +60,4 @@ public interface SessionApi { @Named("DELETE:Session") @DELETE void logout(@HeaderParam("Auth-Token") String token); -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/ZoneApi.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/ZoneApi.java index e90d1d4cef..5e6d6a20e5 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/ZoneApi.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/features/ZoneApi.java @@ -219,4 +219,4 @@ public interface ZoneApi { @Payload("{\"thaw\":true}") @Consumes(APPLICATION_JSON) Job thaw(@PathParam("fqdn") String fqdn) throws JobStillRunningException; -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/functions/ExtractZoneNames.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/functions/ExtractZoneNames.java index 6df9142b51..8b6da2cd20 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/functions/ExtractZoneNames.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/functions/ExtractZoneNames.java @@ -42,4 +42,4 @@ public final class ExtractZoneNames implements Function, return in.substring(position, in.length() - 1); } } -} \ No newline at end of file +} diff --git a/providers/dynect/src/main/java/org/jclouds/dynect/v3/functions/ToRecordIds.java b/providers/dynect/src/main/java/org/jclouds/dynect/v3/functions/ToRecordIds.java index 34edeada4f..2778ef7e6d 100644 --- a/providers/dynect/src/main/java/org/jclouds/dynect/v3/functions/ToRecordIds.java +++ b/providers/dynect/src/main/java/org/jclouds/dynect/v3/functions/ToRecordIds.java @@ -68,4 +68,4 @@ public final class ToRecordIds implements Function> { .rdata(a("1.1.1.1")) .build(); } -} \ No newline at end of file +} diff --git a/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetCNAMERecordResponseTest.java b/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetCNAMERecordResponseTest.java index 15cb8b56d8..6dee9cfe8e 100644 --- a/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetCNAMERecordResponseTest.java +++ b/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetCNAMERecordResponseTest.java @@ -52,4 +52,4 @@ public class GetCNAMERecordResponseTest extends BaseDynECTParseTest> .rdata(mx(10, "mail.egg.org.")) .build(); } -} \ No newline at end of file +} diff --git a/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetNSRecordResponseTest.java b/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetNSRecordResponseTest.java index 093964c758..982a75b742 100644 --- a/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetNSRecordResponseTest.java +++ b/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetNSRecordResponseTest.java @@ -52,4 +52,4 @@ public class GetNSRecordResponseTest extends BaseDynECTParseTest> .rdata(ns("ns4.p28.dynect.net.")) .build(); } -} \ No newline at end of file +} diff --git a/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetPTRRecordResponseTest.java b/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetPTRRecordResponseTest.java index 8a12ec8544..fafbb197c5 100644 --- a/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetPTRRecordResponseTest.java +++ b/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetPTRRecordResponseTest.java @@ -52,4 +52,4 @@ public class GetPTRRecordResponseTest extends BaseDynECTParseTest { .expire(604800) .serial(1).build()).build(); } -} \ No newline at end of file +} diff --git a/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetSPFRecordResponseTest.java b/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetSPFRecordResponseTest.java index 6d4ccc1e7c..c260be01c3 100644 --- a/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetSPFRecordResponseTest.java +++ b/providers/dynect/src/test/java/org/jclouds/dynect/v3/parse/GetSPFRecordResponseTest.java @@ -50,4 +50,4 @@ public class GetSPFRecordResponseTest extends BaseDynECTParseTest { public Zone expected() { return Zone.builder().type(PRIMARY).serialStyle(INCREMENT).serial(5).fqdn("jclouds.org").build(); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSExceptions.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSExceptions.java index 2d964b99e8..f9bbf765da 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSExceptions.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/UltraDNSWSExceptions.java @@ -36,4 +36,4 @@ public interface UltraDNSWSExceptions { super(message, cause); } } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/binders/DirectionalGroupCoordinatesToXML.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/binders/DirectionalGroupCoordinatesToXML.java index 729fee5aa4..afae64f602 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/binders/DirectionalGroupCoordinatesToXML.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/binders/DirectionalGroupCoordinatesToXML.java @@ -43,4 +43,4 @@ public class DirectionalGroupCoordinatesToXML implements Binder { .put("groupName", group.getGroupName()).build(); return (R) request.toBuilder().payload(UriTemplates.expand(TEMPLATE, variables)).build(); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/binders/ZoneAndResourceRecordToXML.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/binders/ZoneAndResourceRecordToXML.java index b59ef7a6ea..9c62ae1e72 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/binders/ZoneAndResourceRecordToXML.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/binders/ZoneAndResourceRecordToXML.java @@ -69,4 +69,4 @@ public class ZoneAndResourceRecordToXML implements MapBinder { public R bindToRequest(R request, Object input) { throw new UnsupportedOperationException("use map form"); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/AccountLevelGroup.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/AccountLevelGroup.java index 8776c6d2bf..21ee7b8bb0 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/AccountLevelGroup.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/AccountLevelGroup.java @@ -92,7 +92,7 @@ public final class AccountLevelGroup { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String id; private String name; private Type type; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalGroup.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalGroup.java index c8b623f1df..25e596b07e 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalGroup.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalGroup.java @@ -92,7 +92,7 @@ public class DirectionalGroup extends ForwardingMultimap { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String name; private Optional description = Optional.absent(); private ImmutableMultimap.Builder regionToTerritories = ImmutableMultimap diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalGroupCoordinates.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalGroupCoordinates.java index f7970c0dcf..bc2a23a0e9 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalGroupCoordinates.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalGroupCoordinates.java @@ -107,7 +107,7 @@ public class DirectionalGroupCoordinates { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String zoneName; private String recordName; private int recordType = -1; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPool.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPool.java index 7d7618d031..b029262230 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPool.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPool.java @@ -175,7 +175,7 @@ public final class DirectionalPool { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String zoneId; private String id; private Optional name = Optional.absent(); diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPoolRecord.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPoolRecord.java index c638a61906..d1c2f7bac1 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPoolRecord.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPoolRecord.java @@ -103,7 +103,7 @@ public class DirectionalPoolRecord { return drBuilder().from(this); } - public final static class Builder { + public static final class Builder { private String type; private int ttl = -1; private boolean noResponseRecord; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPoolRecordDetail.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPoolRecordDetail.java index 7447eb6526..d0d3406000 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPoolRecordDetail.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/DirectionalPoolRecordDetail.java @@ -117,7 +117,7 @@ public class DirectionalPoolRecordDetail { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String zoneName; private String name; private String id; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/PoolRecordSpec.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/PoolRecordSpec.java index d41c7ff06e..63d46e2419 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/PoolRecordSpec.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/PoolRecordSpec.java @@ -148,7 +148,7 @@ public final class PoolRecordSpec { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String description; private String state; private boolean probingEnabled; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ResourceRecord.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ResourceRecord.java index 65850cc74e..69a045131a 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ResourceRecord.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ResourceRecord.java @@ -104,7 +104,7 @@ public class ResourceRecord { return rrBuilder().from(this); } - public final static class Builder { + public static final class Builder { private String dName; private int type = -1; private int ttl = -1; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ResourceRecordDetail.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ResourceRecordDetail.java index 140ae8c266..f162a0b1ee 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ResourceRecordDetail.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ResourceRecordDetail.java @@ -105,7 +105,7 @@ public class ResourceRecordDetail { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String zoneId; private String guid; private String zoneName; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/RoundRobinPool.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/RoundRobinPool.java index 1c79d6090b..23cb3d2634 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/RoundRobinPool.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/RoundRobinPool.java @@ -100,7 +100,7 @@ public final class RoundRobinPool { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String zoneId; private String id; private String name; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/Task.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/Task.java index 18922d8da4..14f00d3a2b 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/Task.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/Task.java @@ -114,7 +114,7 @@ public final class Task { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String guid; private StatusCode statusCode; private Optional message = Optional.absent(); diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/TrafficControllerPool.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/TrafficControllerPool.java index 7904abb51a..eecc6a50ef 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/TrafficControllerPool.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/TrafficControllerPool.java @@ -156,7 +156,7 @@ public final class TrafficControllerPool { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String zoneId; private String id; private String name; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/TrafficControllerPoolRecordDetail.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/TrafficControllerPoolRecordDetail.java index f23a1df11b..e12edc220b 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/TrafficControllerPoolRecordDetail.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/TrafficControllerPoolRecordDetail.java @@ -165,7 +165,7 @@ public final class TrafficControllerPoolRecordDetail { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String id; private String poolId; private TrafficControllerPoolRecord record; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/UpdatePoolRecord.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/UpdatePoolRecord.java index 2bd9af05b5..f81401dd46 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/UpdatePoolRecord.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/UpdatePoolRecord.java @@ -146,7 +146,7 @@ public final class UpdatePoolRecord { return new Builder().from(this); } - public final static class Builder { + public static final class Builder { private String rdata; private String mode; private int priority; 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 60370f6625..78d76ecab7 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 @@ -191,7 +191,7 @@ public final class Zone { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String id; private String name; private Type type; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ZoneProperties.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ZoneProperties.java index e2cd0472d4..727df9d9ee 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ZoneProperties.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/domain/ZoneProperties.java @@ -112,7 +112,7 @@ public final class ZoneProperties { return builder().from(this); } - public final static class Builder { + public static final class Builder { private String name; private Type type; private int typeCode = -1; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/handlers/UltraDNSWSErrorHandler.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/handlers/UltraDNSWSErrorHandler.java index e541901c2c..dc0f4daafd 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/handlers/UltraDNSWSErrorHandler.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/handlers/UltraDNSWSErrorHandler.java @@ -17,7 +17,6 @@ * under the License. */ package org.jclouds.ultradns.ws.handlers; -import static org.jclouds.ultradns.ws.handlers.UltraDNSWSErrorHandler.ErrorCodes.*; import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream; import static org.jclouds.http.HttpUtils.releasePayload; @@ -124,22 +123,22 @@ public class UltraDNSWSErrorHandler implements HttpErrorHandler { private Exception refineException(UltraDNSWSResponseException exception) { String message = exception.getError().getDescription().or(exception.getMessage()); switch (exception.getError().getCode()) { - case UNKNOWN: + case ErrorCodes.UNKNOWN: if (!exception.getError().getDescription().isPresent()) return exception; if (exception.getError().getDescription().get().indexOf("Cannot find") == -1) return exception; - case ZONE_NOT_FOUND: - case RESOURCE_RECORD_NOT_FOUND: - case ACCOUNT_NOT_FOUND: - case POOL_NOT_FOUND: - case DIRECTIONAL_POOL_NOT_FOUND: - case POOL_RECORD_NOT_FOUND: - case GROUP_NOT_FOUND: + case ErrorCodes.ZONE_NOT_FOUND: + case ErrorCodes.RESOURCE_RECORD_NOT_FOUND: + case ErrorCodes.ACCOUNT_NOT_FOUND: + case ErrorCodes.POOL_NOT_FOUND: + case ErrorCodes.DIRECTIONAL_POOL_NOT_FOUND: + case ErrorCodes.POOL_RECORD_NOT_FOUND: + case ErrorCodes.GROUP_NOT_FOUND: return new ResourceNotFoundException(message, exception); - case ZONE_ALREADY_EXISTS: - case RESOURCE_RECORD_ALREADY_EXISTS: - case POOL_ALREADY_EXISTS: + case ErrorCodes.ZONE_ALREADY_EXISTS: + case ErrorCodes.RESOURCE_RECORD_ALREADY_EXISTS: + case ErrorCodes.POOL_ALREADY_EXISTS: return new ResourceAlreadyExistsException(message, exception); } return exception; diff --git a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/DirectionalPoolRecordDetailHandler.java b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/DirectionalPoolRecordDetailHandler.java index e624491bec..518754530d 100644 --- a/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/DirectionalPoolRecordDetailHandler.java +++ b/providers/ultradns-ws/src/main/java/org/jclouds/ultradns/ws/xml/DirectionalPoolRecordDetailHandler.java @@ -24,9 +24,9 @@ import static org.jclouds.util.SaxUtils.equalsOrSuffix; import java.util.Map; import org.jclouds.http.functions.ParseSax; -import static org.jclouds.ultradns.ws.domain.IdAndName.*; import org.jclouds.ultradns.ws.domain.DirectionalPoolRecord; import org.jclouds.ultradns.ws.domain.DirectionalPoolRecordDetail; +import org.jclouds.ultradns.ws.domain.IdAndName; import org.xml.sax.Attributes; /** @@ -64,14 +64,14 @@ public class DirectionalPoolRecordDetailHandler extends drd.id(attributes.get("DirPoolRecordId")); } if (attributes.containsKey("GroupId")) { - drd.group(create(attributes.get("GroupId"), attributes.get("GroupName"))); + drd.group(IdAndName.create(attributes.get("GroupId"), attributes.get("GroupName"))); } if (attributes.containsKey("GeolocationGroupId")) { - drd.geolocationGroup(create(attributes.get("GeolocationGroupId"), + drd.geolocationGroup(IdAndName.create(attributes.get("GeolocationGroupId"), attributes.get("GeolocationGroupName"))); } if (attributes.containsKey("SourceIPGroupId")) { - drd.sourceIpGroup(create(attributes.get("SourceIPGroupId"), attributes.get("SourceIPGroupName"))); + drd.sourceIpGroup(IdAndName.create(attributes.get("SourceIPGroupId"), attributes.get("SourceIPGroupName"))); } if (attributes.containsKey("recordType")) { dr.type(attributes.get("recordType")); diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetAccountLevelDirectionalGroupsResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetAccountLevelDirectionalGroupsResponseTest.java index 4a3fede587..516f0b804b 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetAccountLevelDirectionalGroupsResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetAccountLevelDirectionalGroupsResponseTest.java @@ -66,4 +66,4 @@ public class GetAccountLevelDirectionalGroupsResponseTest extends BaseHandlerTes .type(Type.GEOLOCATION) .recordCount(1).build()).build()); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetAvailableGroupsResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetAvailableGroupsResponseTest.java index 79df598fcd..a1b7a02973 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetAvailableGroupsResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetAvailableGroupsResponseTest.java @@ -49,4 +49,4 @@ public class GetAvailableGroupsResponseTest extends BaseHandlerTest { public FluentIterable expected() { return FluentIterable.from(ImmutableSet.of("EU-foo.jclouds.org.", "non-foo.jclouds.org.")); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSGroupDetailsResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSGroupDetailsResponseTest.java index a1799b8372..1ebce0ddb4 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSGroupDetailsResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSGroupDetailsResponseTest.java @@ -57,4 +57,4 @@ public class GetDirectionalDNSGroupDetailsResponseTest extends BaseHandlerTest { .add("French Southern Territories") .build()).build(); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSRecordsForHostResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSRecordsForHostResponseTest.java index 49d41d6f41..77b00911df 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSRecordsForHostResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalDNSRecordsForHostResponseTest.java @@ -94,4 +94,4 @@ public class GetDirectionalDNSRecordsForHostResponseTest extends BaseHandlerTest .build()); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalPoolsByZoneResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalPoolsByZoneResponseTest.java index 31862e4391..4ddbb87fbd 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalPoolsByZoneResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetDirectionalPoolsByZoneResponseTest.java @@ -63,4 +63,4 @@ public class GetDirectionalPoolsByZoneResponseTest extends BaseHandlerTest { .id("000000000000000B") .dname("geo.jclouds.org.").build()).build()); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetPoolRecordSpecResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetPoolRecordSpecResponseTest.java index 64f896100a..d859b7a59d 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetPoolRecordSpecResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetPoolRecordSpecResponseTest.java @@ -58,4 +58,4 @@ public class GetPoolRecordSpecResponseTest extends BaseHandlerTest { .ttl(120).build(); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetRRLoadBalancingPoolsByZoneResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetRRLoadBalancingPoolsByZoneResponseTest.java index 78743813a9..9ac9890a03 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetRRLoadBalancingPoolsByZoneResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetRRLoadBalancingPoolsByZoneResponseTest.java @@ -65,4 +65,4 @@ public class GetRRLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest { .name("euwest") .dname("app-euwest.jclouds.org.").build()).build()); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetTCLoadBalancingPoolsByZoneResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetTCLoadBalancingPoolsByZoneResponseTest.java index 13faa9fe7f..a46d544155 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetTCLoadBalancingPoolsByZoneResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetTCLoadBalancingPoolsByZoneResponseTest.java @@ -58,4 +58,4 @@ public class GetTCLoadBalancingPoolsByZoneResponseTest extends BaseHandlerTest { .failOverEnabled(true) .probingEnabled(true).build()).build()); } -} \ No newline at end of file +} diff --git a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetTCPoolRecordsResponseTest.java b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetTCPoolRecordsResponseTest.java index 6ea56896ab..e7cf9956ad 100644 --- a/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetTCPoolRecordsResponseTest.java +++ b/providers/ultradns-ws/src/test/java/org/jclouds/ultradns/ws/parse/GetTCPoolRecordsResponseTest.java @@ -76,4 +76,4 @@ public class GetTCPoolRecordsResponseTest extends BaseHandlerTest { .build()); } -} \ No newline at end of file +} diff --git a/resources/checkstyle.xml b/resources/checkstyle.xml index e1cd59e8b9..7bf4c9e1e6 100644 --- a/resources/checkstyle.xml +++ b/resources/checkstyle.xml @@ -10,7 +10,6 @@ -