mirror of https://github.com/apache/jclouds.git
Address error-prone empty statement warnings
This commit is contained in:
parent
cf597121b2
commit
6c5effcdb1
|
@ -89,7 +89,7 @@ public class ParseImageListFromJsonResponseTest {
|
|||
assertEquals(response.get(1).getId(), 743);
|
||||
assertEquals(response.get(1).getName(), "My Server Backup");
|
||||
assertEquals(response.get(1).getCreated(), dateService.iso8601SecondsDateParse("2009-07-07T09:56:16-05:00"));
|
||||
;
|
||||
|
||||
assertEquals(response.get(1).getProgress(), Integer.valueOf(80));
|
||||
assertEquals(response.get(1).getServerId(), Integer.valueOf(12));
|
||||
assertEquals(response.get(1).getStatus(), ImageStatus.SAVING);
|
||||
|
|
|
@ -48,7 +48,7 @@ public class CreateServerOptionsTest {
|
|||
|
||||
private HttpRequest buildRequest(CreateServerOptions options) {
|
||||
injector.injectMembers(options);
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
options.bindToRequest(request, ImmutableMap.<String, Object>of("name", "foo", "imageId", "1", "flavorId", "2"));
|
||||
return request;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ public class CreateSharedIpGroupOptionsTest {
|
|||
|
||||
private HttpRequest buildRequest(CreateSharedIpGroupOptions options) {
|
||||
injector.injectMembers(options);
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
options.bindToRequest(request, ImmutableMap.<String,Object>of("name", "foo"));
|
||||
return request;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class RebuildServerOptionsTest {
|
|||
|
||||
private HttpRequest buildRequest(RebuildServerOptions options) {
|
||||
injector.injectMembers(options);
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
options.bindToRequest(request, new HashMap<String, Object>());
|
||||
return request;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ public class BindBlockDeviceMappingToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeBlockDeviceMapping() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BindBundleIdsToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeArray() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class BindFiltersToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeMultimap() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BindGroupNamesToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeArray() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BindInstanceIdsToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeArray() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BindKeyNamesToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeArray() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class BindProductCodesToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeIterable() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BindPublicIpsToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeArray() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BindResourceIdsToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeArray() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class BindUserGroupsToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeIterable() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public class BindUserIdGroupPairToSourceSecurityGroupFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeUserIdGroupPair() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ public class BindUserIdsToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeIterable() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BindVolumeIdsToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeArray() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ public class IfNotNullBindAvailabilityZoneToFormParamTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeString() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ public class TestUtils {
|
|||
File file = new File(TARGET_BASE_DIR, containerName);
|
||||
if (!file.mkdirs()) {
|
||||
throw new IOException("Could not mkdir: " + file);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -153,7 +153,7 @@ public class ImageApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getImageApiForZone("az-1.region-a.geo-1").getMetadata(imageId);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,7 +208,7 @@ public class ImageApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getImageApiForZone("az-1.region-a.geo-1").setMetadata(imageId, metadata);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -264,7 +264,7 @@ public class ImageApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getImageApiForZone("az-1.region-a.geo-1").setMetadata(imageId, metadata);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -302,7 +302,7 @@ public class ServerApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerDoesNotExist.getServerApiForZone("az-1.region-a.geo-1").createImageFromServer(imageName, serverId);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -348,7 +348,7 @@ public class ServerApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getServerApiForZone("az-1.region-a.geo-1").stop(serverId);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -394,7 +394,7 @@ public class ServerApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getServerApiForZone("az-1.region-a.geo-1").start(serverId);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -438,7 +438,7 @@ public class ServerApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getServerApiForZone("az-1.region-a.geo-1").getMetadata(serverId);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -493,7 +493,7 @@ public class ServerApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getServerApiForZone("az-1.region-a.geo-1").setMetadata(serverId, metadata);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ public class ServerApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getServerApiForZone("az-1.region-a.geo-1").setMetadata(serverId, metadata);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -600,7 +600,7 @@ public class ServerApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getServerApiForZone("az-1.region-a.geo-1").setMetadata(serverId, metadata);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -656,7 +656,7 @@ public class ServerApiExpectTest extends BaseNovaApiExpectTest {
|
|||
apiWhenServerExists.getServerApiForZone("az-1.region-a.geo-1").setMetadata(serverId, metadata);
|
||||
fail("Expected an exception.");
|
||||
} catch (Exception e) {
|
||||
;
|
||||
// expected
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public class BindS3ObjectMetadataToRequestTest extends BaseS3AsyncClientTest<S3A
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeS3Object() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
injector.getInstance(BindS3ObjectMetadataToRequest.class).bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ public class BindSwiftObjectMetadataToRequestTest extends CommonSwiftClientTest
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeSwiftObject() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
injector.getInstance(BindSwiftObjectMetadataToRequest.class).bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ public class BindBlobToMultipartFormTest {
|
|||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeBlob() {
|
||||
BindBlobToMultipartForm binder = new BindBlobToMultipartForm();
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public class BindMapToHeadersWithPrefixTest {
|
|||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeMap() {
|
||||
BindMapToHeadersWithPrefix binder = new BindMapToHeadersWithPrefix("prefix:");
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ public class BindUserMetadataToHeadersWithPrefixTest {
|
|||
public void testMustBeBlob() {
|
||||
BindUserMetadataToHeadersWithPrefix binder = new BindUserMetadataToHeadersWithPrefix(
|
||||
new BindMapToHeadersWithPrefix("prefix:"));
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ public class ApisTest {
|
|||
apiMetadata = Apis.withId("fake-id");
|
||||
fail("Looking for a api with an id that doesn't exist should " + "throw an exception.");
|
||||
} catch (NoSuchElementException nsee) {
|
||||
; // Expected
|
||||
// expected
|
||||
}
|
||||
|
||||
apiMetadata = Apis.withId(testBlobstoreApi.getId());
|
||||
|
|
|
@ -135,7 +135,7 @@ public class ParseSaxTest extends BaseHandlerTest {
|
|||
|
||||
ParseSax<String> parser = createParser();
|
||||
HttpRequest request = HttpRequest.builder().method("GET").endpoint("http://foohost").build();
|
||||
HttpResponse response = HttpResponse.builder().statusCode(304).message("Not Modified").build();;
|
||||
HttpResponse response = HttpResponse.builder().statusCode(304).message("Not Modified").build();
|
||||
Locator locator = createMock(Locator.class);
|
||||
expect(locator.getColumnNumber()).andReturn(1);
|
||||
expect(locator.getLineNumber()).andReturn(1);
|
||||
|
|
|
@ -175,8 +175,8 @@ public class GsonExperimentsTest {
|
|||
protected <T> T parseThingFromReaderOrNull(String toFind, JsonReader reader, Type type) throws IOException {
|
||||
AtomicReference<String> name = Atomics.newReference();
|
||||
JsonToken token = reader.peek();
|
||||
for (; token != JsonToken.END_DOCUMENT && nnn(toFind, reader, token, name); token = skipAndPeek(token, reader))
|
||||
;
|
||||
for (; token != JsonToken.END_DOCUMENT && nnn(toFind, reader, token, name); token = skipAndPeek(token, reader)) {
|
||||
}
|
||||
T val = gson.<T> fromJson(reader, type);
|
||||
reader.close();
|
||||
return val;
|
||||
|
|
|
@ -49,7 +49,7 @@ public class ProvidersTest {
|
|||
providerMetadata = Providers.withId("fake-id");
|
||||
fail("Looking for a provider with an id that doesn't exist should " + "throw an exception.");
|
||||
} catch (NoSuchElementException nsee) {
|
||||
; // Expected
|
||||
// expected
|
||||
}
|
||||
|
||||
providerMetadata = Providers.withId(testBlobstoreProvider.getId());
|
||||
|
|
|
@ -51,7 +51,7 @@ public class BindTagsToIndexedFormParamsTest {
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeArray() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
binder.bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public class BindObjectMetadataToRequestTest extends BaseS3AsyncClientTest<S3Asy
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeObjectMetadata() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
injector.getInstance(BindObjectMetadataToRequest.class).bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ public class BindAzureBlobMetadataToRequestTest extends BaseAsyncClientTest<Azur
|
|||
|
||||
@Test(expectedExceptions = IllegalArgumentException.class)
|
||||
public void testMustBeAzureBlob() {
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();;
|
||||
HttpRequest request = HttpRequest.builder().method("POST").endpoint("http://localhost").build();
|
||||
injector.getInstance(BindAzureBlobMetadataToRequest.class).bindToRequest(request, new File("foo"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue