From f85f0889b3b0e5e9694afab4dd01a4a97a155188 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Tue, 3 Jul 2018 07:51:17 -0500 Subject: Collection syntax change because of Sonar Issue-ID: AAF-386 Change-Id: I8ba8d8561d03e680ddc90a81b8db0339814c65fa Signed-off-by: Instrumental --- .../main/java/org/onap/aaf/misc/xgen/CacheGen.java | 2 +- .../org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java | 20 ++++++++++---------- .../org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java | 12 ++++++------ .../org/onap/aaf/misc/xgen/xml/JU_XMLGenTest.java | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) (limited to 'misc/xgen') diff --git a/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/CacheGen.java b/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/CacheGen.java index 74b590da..417f80b7 100644 --- a/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/CacheGen.java +++ b/misc/xgen/src/main/java/org/onap/aaf/misc/xgen/CacheGen.java @@ -42,7 +42,7 @@ public abstract class CacheGen> { public final static int HTML5 = 0x8; - private ArrayList> sections = new ArrayList>(); + private ArrayList> sections = new ArrayList<>(); private int flags; private final Thematic thematic; diff --git a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java index 18b33938..9160095d 100644 --- a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java +++ b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java @@ -60,7 +60,7 @@ public class JU_HTML4GenTest { gen.html("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : DOCTYPE.toCharArray()) { Integer times = map.get(ch); map.put(ch, (times == null ? 0 : times) + 1); @@ -84,7 +84,7 @@ public class JU_HTML4GenTest { gen.head(); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "head".toCharArray()) { Integer times = map.get(ch); @@ -103,7 +103,7 @@ public class JU_HTML4GenTest { gen.body("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "body".toCharArray()) { Integer times = map.get(ch); @@ -126,7 +126,7 @@ public class JU_HTML4GenTest { gen.charset(charset); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : CHARSET_LINE.toCharArray()) { Integer times = map.get(ch); @@ -145,7 +145,7 @@ public class JU_HTML4GenTest { gen.header("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "header".toCharArray()) { Integer times = map.get(ch); @@ -174,7 +174,7 @@ public class JU_HTML4GenTest { gen.footer("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "footer".toCharArray()) { Integer times = map.get(ch); @@ -203,7 +203,7 @@ public class JU_HTML4GenTest { gen.section("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "section".toCharArray()) { Integer times = map.get(ch); @@ -232,7 +232,7 @@ public class JU_HTML4GenTest { gen.article("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "attrib".toCharArray()) { Integer times = map.get(ch); @@ -261,7 +261,7 @@ public class JU_HTML4GenTest { gen.aside("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "aside".toCharArray()) { Integer times = map.get(ch); @@ -290,7 +290,7 @@ public class JU_HTML4GenTest { gen.nav("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "nav".toCharArray()) { Integer times = map.get(ch); diff --git a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java index 953a4a3b..69ebf89b 100644 --- a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java +++ b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java @@ -36,8 +36,8 @@ import org.mockito.Mock; public class JU_HTML5GenTest { - private final static String DOCTYPE = ""; +// private final static String DOCTYPE = ""; private String charset = "utf-8"; @@ -59,7 +59,7 @@ public class JU_HTML5GenTest { gen.html("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "html".toCharArray()) { Integer times = map.get(ch); @@ -79,7 +79,7 @@ public class JU_HTML5GenTest { gen.head(); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "head".toCharArray()) { Integer times = map.get(ch); @@ -98,7 +98,7 @@ public class JU_HTML5GenTest { gen.body("attributes"); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : "body".toCharArray()) { Integer times = map.get(ch); @@ -121,7 +121,7 @@ public class JU_HTML5GenTest { gen.charset(charset); - Map map = new TreeMap(); + Map map = new TreeMap<>(); for (char ch : CHARSET_LINE.toCharArray()) { Integer times = map.get(ch); diff --git a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/xml/JU_XMLGenTest.java b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/xml/JU_XMLGenTest.java index 2dbc422a..1c00b452 100644 --- a/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/xml/JU_XMLGenTest.java +++ b/misc/xgen/src/test/java/org/onap/aaf/misc/xgen/xml/JU_XMLGenTest.java @@ -41,7 +41,7 @@ public class JU_XMLGenTest { String XML_TAG = ""; - Map map = new TreeMap(); + Map map = new TreeMap<>(); @Before public void setUp() throws Exception { -- cgit 1.2.3-korg