Do not repeat array type in initializers

This commit is contained in:
Andrew Gaul 2013-06-18 21:01:52 -07:00
parent 75385ee57d
commit 1a6be0eb67
8 changed files with 15 additions and 15 deletions

View File

@ -416,7 +416,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest {
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupIds = ImmutableSet.<String> of();
int[] ports = new int[] {};
int[] ports = {};
boolean shouldAuthorizeSelf = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
@ -450,7 +450,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest {
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupIds = ImmutableSet.<String> of();
int[] ports = new int[] { 22, 80 };
int[] ports = { 22, 80 };
boolean shouldAuthorizeSelf = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
@ -484,7 +484,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest {
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupIds = ImmutableSet.<String> of();
int[] ports = new int[] {};
int[] ports = {};
boolean shouldAuthorizeSelf = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
@ -517,7 +517,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest {
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupIds = ImmutableSet.<String> of("group1", "group2");
int[] ports = new int[] {};
int[] ports = {};
boolean shouldAuthorizeSelf = true;
boolean groupExisted = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup, "group1", "group2");

View File

@ -139,7 +139,7 @@ public class FilesystemAsyncBlobStoreTest {
assertTrue(containersRetrieved.isEmpty(), "List operation returns a not empty set of container");
// Testing list with some containers
String[] containerNames = new String[]{"34343", "aaaa", "bbbbb"};
String[] containerNames = {"34343", "aaaa", "bbbbb"};
containersCreated = Sets.newHashSet();
for (String containerName : containerNames) {
blobStore.createContainerInLocation(null, containerName);

View File

@ -434,7 +434,7 @@ public class FilesystemStorageStrategyImplTest {
}
public void testBlobExists() throws IOException {
String[] sourceBlobKeys = new String[] { TestUtils.createRandomBlobKey("blobExists-", ".jpg"),
String[] sourceBlobKeys = { TestUtils.createRandomBlobKey("blobExists-", ".jpg"),
TestUtils.createRandomBlobKey("blobExists-", ".jpg"),
TestUtils.createRandomBlobKey("afasd" + FS + "asdma" + FS + "blobExists-", ".jpg") };

View File

@ -79,7 +79,7 @@ public abstract class CommonSwiftClientLiveTest<C extends CommonSwiftClient> ext
assertTrue(initialContainerCount >= 0);
// Create test containers
String[] containerNames = new String[] { containerPrefix + ".testListOwnedContainers1",
String[] containerNames = { containerPrefix + ".testListOwnedContainers1",
containerPrefix + ".testListOwnedContainers2" };
assertTrue(getApi().createContainer(containerNames[0]));
assertTrue(getApi().createContainer(containerNames[1]));

View File

@ -24,7 +24,7 @@ package org.jclouds.vcloud.utils;
*/
public class TestUtils {
public static final Object[][] NO_INVOCATIONS = new Object[0][0];
public static final Object[][] SINGLE_NO_ARG_INVOCATION = new Object[][] { new Object[0] };
public static final Object[][] SINGLE_NO_ARG_INVOCATION = { new Object[0] };
public static boolean isWindowsOs() {
return System.getProperty("os.name", "").toLowerCase().contains("windows");

View File

@ -89,7 +89,7 @@ public class TransientBlobRequestSignerTest extends BaseAsyncClientTest<LocalAsy
public void testSignPutBlobWithGenerate() throws ArrayIndexOutOfBoundsException, SecurityException,
IllegalArgumentException, NoSuchMethodException, IOException {
Blob blob = blobFactory.get().name(blobName).payload("foo").calculateMD5().contentType("text/plain").build();
byte[] md5 = new byte[] { -84, -67, 24, -37, 76, -62, -8, 92, -19, -17, 101, 79, -52, -60, -92, -40 };
byte[] md5 = { -84, -67, 24, -37, 76, -62, -8, 92, -19, -17, 101, 79, -52, -60, -92, -40 };
assertEquals(blob.getPayload().getContentMetadata().getContentMD5(), md5);

View File

@ -24,7 +24,7 @@ package org.jclouds.utils;
*/
public class TestUtils {
public static final Object[][] NO_INVOCATIONS = new Object[0][0];
public static final Object[][] SINGLE_NO_ARG_INVOCATION = new Object[][] { new Object[0] };
public static final Object[][] SINGLE_NO_ARG_INVOCATION = { new Object[0] };
public static boolean isJava7() {
System.out.println(System.getProperty("java.version", "None??"));

View File

@ -656,7 +656,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupNames = ImmutableSet.<String> of();
int[] ports = new int[] {};
int[] ports = {};
boolean shouldAuthorizeSelf = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
@ -690,7 +690,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupNames = ImmutableSet.<String> of();
int[] ports = new int[] { 22, 80 };
int[] ports = { 22, 80 };
boolean shouldAuthorizeSelf = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
@ -724,7 +724,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupNames = ImmutableSet.<String> of();
int[] ports = new int[] {};
int[] ports = {};
boolean shouldAuthorizeSelf = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
@ -758,7 +758,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupNames = ImmutableSet.<String> of("group1", "group2");
int[] ports = new int[] {};
int[] ports = {};
boolean shouldAuthorizeSelf = true;
boolean groupExisted = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup, "group1", "group2");
@ -794,7 +794,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
String group = "group";
String generatedMarkerGroup = "jclouds#group";
Set<String> groupNames = ImmutableSet.<String> of();
int[] ports = new int[] {};
int[] ports = {};
boolean shouldAuthorizeSelf = true;
boolean groupExisted = true;
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);