summaryrefslogtreecommitdiffstats
path: root/misc/xgen
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 /misc/xgen
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 'misc/xgen')
-rw-r--r--misc/xgen/src/main/java/org/onap/aaf/misc/xgen/CacheGen.java2
-rw-r--r--misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML4GenTest.java20
-rw-r--r--misc/xgen/src/test/java/org/onap/aaf/misc/xgen/html/JU_HTML5GenTest.java12
-rw-r--r--misc/xgen/src/test/java/org/onap/aaf/misc/xgen/xml/JU_XMLGenTest.java2
4 files changed, 18 insertions, 18 deletions
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<G extends XGen<G>> {
public final static int HTML5 = 0x8;
- private ArrayList<Section<G>> sections = new ArrayList<Section<G>>();
+ private ArrayList<Section<G>> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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 = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\""
- + " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
+// private final static String DOCTYPE = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\""
+// + " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">";
private String charset = "utf-8";
@@ -59,7 +59,7 @@ public class JU_HTML5GenTest {
gen.html("attributes");
- Map<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> map = new TreeMap<>();
for (char ch : "html".toCharArray()) {
Integer times = map.get(ch);
@@ -79,7 +79,7 @@ public class JU_HTML5GenTest {
gen.head();
- Map<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> 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 = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
- Map<Character, Integer> map = new TreeMap<Character, Integer>();
+ Map<Character, Integer> map = new TreeMap<>();
@Before
public void setUp() throws Exception {