mirror of https://github.com/apache/jclouds.git
Do not repeat array type in initializers
This commit is contained in:
parent
75385ee57d
commit
1a6be0eb67
|
@ -416,7 +416,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest {
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupIds = ImmutableSet.<String> of();
|
Set<String> groupIds = ImmutableSet.<String> of();
|
||||||
int[] ports = new int[] {};
|
int[] ports = {};
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
||||||
|
|
||||||
|
@ -450,7 +450,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest {
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupIds = ImmutableSet.<String> of();
|
Set<String> groupIds = ImmutableSet.<String> of();
|
||||||
int[] ports = new int[] { 22, 80 };
|
int[] ports = { 22, 80 };
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
||||||
|
|
||||||
|
@ -484,7 +484,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest {
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupIds = ImmutableSet.<String> of();
|
Set<String> groupIds = ImmutableSet.<String> of();
|
||||||
int[] ports = new int[] {};
|
int[] ports = {};
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
||||||
|
|
||||||
|
@ -517,7 +517,7 @@ public class CreateKeyPairAndSecurityGroupsAsNeededAndReturnRunOptionsTest {
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupIds = ImmutableSet.<String> of("group1", "group2");
|
Set<String> groupIds = ImmutableSet.<String> of("group1", "group2");
|
||||||
int[] ports = new int[] {};
|
int[] ports = {};
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
boolean groupExisted = true;
|
boolean groupExisted = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup, "group1", "group2");
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup, "group1", "group2");
|
||||||
|
|
|
@ -139,7 +139,7 @@ public class FilesystemAsyncBlobStoreTest {
|
||||||
assertTrue(containersRetrieved.isEmpty(), "List operation returns a not empty set of container");
|
assertTrue(containersRetrieved.isEmpty(), "List operation returns a not empty set of container");
|
||||||
|
|
||||||
// Testing list with some containers
|
// Testing list with some containers
|
||||||
String[] containerNames = new String[]{"34343", "aaaa", "bbbbb"};
|
String[] containerNames = {"34343", "aaaa", "bbbbb"};
|
||||||
containersCreated = Sets.newHashSet();
|
containersCreated = Sets.newHashSet();
|
||||||
for (String containerName : containerNames) {
|
for (String containerName : containerNames) {
|
||||||
blobStore.createContainerInLocation(null, containerName);
|
blobStore.createContainerInLocation(null, containerName);
|
||||||
|
|
|
@ -434,7 +434,7 @@ public class FilesystemStorageStrategyImplTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBlobExists() throws IOException {
|
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("blobExists-", ".jpg"),
|
||||||
TestUtils.createRandomBlobKey("afasd" + FS + "asdma" + FS + "blobExists-", ".jpg") };
|
TestUtils.createRandomBlobKey("afasd" + FS + "asdma" + FS + "blobExists-", ".jpg") };
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public abstract class CommonSwiftClientLiveTest<C extends CommonSwiftClient> ext
|
||||||
assertTrue(initialContainerCount >= 0);
|
assertTrue(initialContainerCount >= 0);
|
||||||
|
|
||||||
// Create test containers
|
// Create test containers
|
||||||
String[] containerNames = new String[] { containerPrefix + ".testListOwnedContainers1",
|
String[] containerNames = { containerPrefix + ".testListOwnedContainers1",
|
||||||
containerPrefix + ".testListOwnedContainers2" };
|
containerPrefix + ".testListOwnedContainers2" };
|
||||||
assertTrue(getApi().createContainer(containerNames[0]));
|
assertTrue(getApi().createContainer(containerNames[0]));
|
||||||
assertTrue(getApi().createContainer(containerNames[1]));
|
assertTrue(getApi().createContainer(containerNames[1]));
|
||||||
|
|
|
@ -24,7 +24,7 @@ package org.jclouds.vcloud.utils;
|
||||||
*/
|
*/
|
||||||
public class TestUtils {
|
public class TestUtils {
|
||||||
public static final Object[][] NO_INVOCATIONS = new Object[0][0];
|
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() {
|
public static boolean isWindowsOs() {
|
||||||
return System.getProperty("os.name", "").toLowerCase().contains("windows");
|
return System.getProperty("os.name", "").toLowerCase().contains("windows");
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class TransientBlobRequestSignerTest extends BaseAsyncClientTest<LocalAsy
|
||||||
public void testSignPutBlobWithGenerate() throws ArrayIndexOutOfBoundsException, SecurityException,
|
public void testSignPutBlobWithGenerate() throws ArrayIndexOutOfBoundsException, SecurityException,
|
||||||
IllegalArgumentException, NoSuchMethodException, IOException {
|
IllegalArgumentException, NoSuchMethodException, IOException {
|
||||||
Blob blob = blobFactory.get().name(blobName).payload("foo").calculateMD5().contentType("text/plain").build();
|
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);
|
assertEquals(blob.getPayload().getContentMetadata().getContentMD5(), md5);
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ package org.jclouds.utils;
|
||||||
*/
|
*/
|
||||||
public class TestUtils {
|
public class TestUtils {
|
||||||
public static final Object[][] NO_INVOCATIONS = new Object[0][0];
|
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() {
|
public static boolean isJava7() {
|
||||||
System.out.println(System.getProperty("java.version", "None??"));
|
System.out.println(System.getProperty("java.version", "None??"));
|
||||||
|
|
|
@ -656,7 +656,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupNames = ImmutableSet.<String> of();
|
Set<String> groupNames = ImmutableSet.<String> of();
|
||||||
int[] ports = new int[] {};
|
int[] ports = {};
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
||||||
|
|
||||||
|
@ -690,7 +690,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupNames = ImmutableSet.<String> of();
|
Set<String> groupNames = ImmutableSet.<String> of();
|
||||||
int[] ports = new int[] { 22, 80 };
|
int[] ports = { 22, 80 };
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
||||||
|
|
||||||
|
@ -724,7 +724,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupNames = ImmutableSet.<String> of();
|
Set<String> groupNames = ImmutableSet.<String> of();
|
||||||
int[] ports = new int[] {};
|
int[] ports = {};
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
||||||
|
|
||||||
|
@ -758,7 +758,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupNames = ImmutableSet.<String> of("group1", "group2");
|
Set<String> groupNames = ImmutableSet.<String> of("group1", "group2");
|
||||||
int[] ports = new int[] {};
|
int[] ports = {};
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
boolean groupExisted = true;
|
boolean groupExisted = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup, "group1", "group2");
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup, "group1", "group2");
|
||||||
|
@ -794,7 +794,7 @@ public class CreateKeyPairPlacementAndSecurityGroupsAsNeededAndReturnRunOptionsT
|
||||||
String group = "group";
|
String group = "group";
|
||||||
String generatedMarkerGroup = "jclouds#group";
|
String generatedMarkerGroup = "jclouds#group";
|
||||||
Set<String> groupNames = ImmutableSet.<String> of();
|
Set<String> groupNames = ImmutableSet.<String> of();
|
||||||
int[] ports = new int[] {};
|
int[] ports = {};
|
||||||
boolean shouldAuthorizeSelf = true;
|
boolean shouldAuthorizeSelf = true;
|
||||||
boolean groupExisted = true;
|
boolean groupExisted = true;
|
||||||
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
Set<String> returnVal = ImmutableSet.<String> of(generatedMarkerGroup);
|
||||||
|
|
Loading…
Reference in New Issue