summaryrefslogtreecommitdiffstats
path: root/cadi/core/src/test
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-07-03 07:51:17 -0500
committerInstrumental <jonathan.gathman@att.com>2018-07-03 12:06:59 -0500
commitf85f0889b3b0e5e9694afab4dd01a4a97a155188 (patch)
tree4a7119cfa0a112e514f50bbc2961981c3670ea03 /cadi/core/src/test
parent8efa968683ef2c4ab0ae7f4c0d2ccb0fcaa8af7b (diff)
Collection syntax change because of Sonar
Issue-ID: AAF-386 Change-Id: I8ba8d8561d03e680ddc90a81b8db0339814c65fa Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'cadi/core/src/test')
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java4
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java2
-rw-r--r--cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java6
4 files changed, 8 insertions, 8 deletions
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java
index b2739b9d..11877dea 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_AbsUserCache.java
@@ -284,10 +284,10 @@ public class JU_AbsUserCache {
assertThat(dumpInfo.size(), is(2));
// Utility lists
- List<String> names = new ArrayList<String>();
+ List<String> names = new ArrayList<>();
names.add(name1);
names.add(name2);
- List<String> permissions = new ArrayList<String>();
+ List<String> permissions = new ArrayList<>();
permissions.add("NewKey1");
permissions.add("NewKey2");
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java
index 25683249..2d5ba8d2 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/test/JU_User.java
@@ -158,7 +158,7 @@ public class JU_User {
@Test
public void addValuesToNewMapTest() {
User<Permission> user = new User<Permission>(principal);
- Map<String, Permission> newMap = new HashMap<String,Permission>();
+ Map<String, Permission> newMap = new HashMap<>();
assertFalse(user.contains(permission));
@@ -167,7 +167,7 @@ public class JU_User {
assertTrue(user.contains(permission));
- List<Permission> sink = new ArrayList<Permission>();
+ List<Permission> sink = new ArrayList<>();
user.copyPermsTo(sink);
assertThat(sink.size(), is(1));
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java
index 79209322..b9f0e997 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Pool.java
@@ -71,7 +71,7 @@ public class JU_Pool {
public void getTest() throws CadiException {
Pool<Integer> intPool = new Pool<Integer>(new IntegerCreator());
- List<Pooled<Integer>> gotten = new ArrayList<Pooled<Integer>>();
+ List<Pooled<Integer>> gotten = new ArrayList<>();
for (int i = 0; i < 10; i++) {
gotten.add(intPool.get());
assertThat(gotten.get(i).content, is(i));
diff --git a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java
index b2600aa5..551f725d 100644
--- a/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java
+++ b/cadi/core/src/test/java/org/onap/aaf/cadi/util/test/JU_Vars.java
@@ -39,21 +39,21 @@ public class JU_Vars {
@Test
public void convert() {
String test = "test";
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
list.add("method");
assertEquals(Vars.convert(test, list), test);
}
@Test
public void convertTest1() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
list.add("method");
assertEquals(Vars.convert("test", list), "test");
}
@Test
public void convertTest2() {
- List<String> list = new ArrayList<String>();
+ List<String> list = new ArrayList<>();
list.add("method");
assertEquals(Vars.convert("test", list), "test");
}