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 8918e3bc5b..ba9d88e270 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 @@ -222,7 +222,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore { ListenableFuture> returnVal = async.listDirectory(container, nativeOptions); ListenableFuture> list = transform(returnVal, container2ResourceList, userExecutor); - return (ListenableFuture>) (options.isDetailed() ? transform(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/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/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/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/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/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/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/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/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/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/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/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 99c11288f0..5b7dff4fc9 100644 --- a/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java +++ b/compute/src/test/java/org/jclouds/compute/internal/BaseComputeServiceLiveTest.java @@ -567,7 +567,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/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/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/test/java/org/jclouds/apis/BaseContextLiveTest.java b/core/src/test/java/org/jclouds/apis/BaseContextLiveTest.java index d8c2891598..1cc1dd98d7 100644 --- a/core/src/test/java/org/jclouds/apis/BaseContextLiveTest.java +++ b/core/src/test/java/org/jclouds/apis/BaseContextLiveTest.java @@ -108,7 +108,7 @@ public abstract class BaseContextLiveTest { */ protected ApiMetadata createApiMetadata() { try { - return (ApiMetadata) Apis.withId(provider); + return Apis.withId(provider); } catch (NoSuchElementException e) { return null; } @@ -123,7 +123,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/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/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/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/SequentialMultipartUploadStrategy.java b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/SequentialMultipartUploadStrategy.java index 22529b7e23..9c8fc72edf 100644 --- a/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/SequentialMultipartUploadStrategy.java +++ b/providers/aws-s3/src/main/java/org/jclouds/aws/s3/blobstore/strategy/internal/SequentialMultipartUploadStrategy.java @@ -99,7 +99,7 @@ public class SequentialMultipartUploadStrategy implements MultipartUploadStrateg int parts = algorithm.getParts(); long chunkSize = algorithm.getChunkSize(); if (parts > 0) { - AWSS3Client client = (AWSS3Client) ablobstore.getContext() + AWSS3Client client = ablobstore.getContext() .unwrap(AWSS3ApiMetadata.CONTEXT_TOKEN).getApi(); String uploadId = client.initiateMultipartUpload(container, ObjectMetadataBuilder.create().key(key).build()); // TODO md5 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/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/ShellToken.java b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/ShellToken.java index 7a91d5bca3..83d0dc9348 100644 --- a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/ShellToken.java +++ b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/domain/ShellToken.java @@ -74,6 +74,7 @@ public enum ShellToken { return familyToTokenValueMap.getUnchecked(family); } + @SuppressWarnings("fallthrough") public String to(OsFamily family) { checkNotNull(family, "family"); switch (this) {