Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework')
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java18
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java2
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java14
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java4
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java20
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java6
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java6
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java16
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java22
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java12
-rw-r--r--plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java2
15 files changed, 66 insertions, 66 deletions
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java
index bfc60ea24cb..0454631a081 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/text/UtfReadingRuleTest.java
@@ -74,7 +74,7 @@ public final class UtfReadingRuleTest {
@Test
public void testCharset() {
- Stack<String> charsetStack = new Stack<String>();
+ Stack<String> charsetStack = new Stack<>();
charsetStack.add("UnknownCharset");
charsetStack.add("UTF-8");
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java
index cbe4853433b..15e0adfc88d 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java
@@ -22,7 +22,7 @@ import org.junit.Test;
public class CompositeKeyHashMapTest {
@Test
public void testEnumerateKeys() {
- CompositeKeyHashMap<String, String, String> testMap = new CompositeKeyHashMap<String, String, String>();
+ CompositeKeyHashMap<String, String, String> testMap = new CompositeKeyHashMap<>();
testMap.put("red", "blue", "value1");
testMap.put("red", "green", "value2");
testMap.put("red", "red", "value3");
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java
index 5a422956587..281fe69b758 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/MatchLocationTest.java
@@ -57,7 +57,7 @@ public class MatchLocationTest {
@org.junit.Test
public void testHashCorrectness() {
- HashMap<MatchLocation, Double> hash = new HashMap<MatchLocation, Double>();
+ HashMap<MatchLocation, Double> hash = new HashMap<>();
hash.put(mapToPi, Math.PI);
hash.put(mapToE, Math.E);
Assert.assertTrue(hash.get(mapToPi).equals(Math.PI));
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java
index 0caba61722a..1c6fb46d0cf 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PairTest.java
@@ -20,13 +20,13 @@ import org.junit.Assert;
public class PairTest {
private static Integer a = Integer.valueOf(144);
private static Integer b = Integer.valueOf(233);
- private static Pair<Integer, Integer> mapToPi = new Pair<Integer, Integer>(a, b);
- private static Pair<Integer, Integer> mapToE = new Pair<Integer, Integer>(b, a);
- private static Pair<Integer, Integer> alsoMapToPi = new Pair<Integer, Integer>(a, b);
- private static Pair<Integer, Integer> alsoMapToE = new Pair<Integer, Integer>(b, a);
- private static Pair<Integer, Integer> firstEntryNull = new Pair<Integer, Integer>(null, 144);
- private static Pair<Integer, Integer> secondEntryNull = new Pair<Integer, Integer>(144, null);
- private static Pair<Integer, Integer> nonNull = new Pair<Integer, Integer>(15, 144);
+ private static Pair<Integer, Integer> mapToPi = new Pair<>(a, b);
+ private static Pair<Integer, Integer> mapToE = new Pair<>(b, a);
+ private static Pair<Integer, Integer> alsoMapToPi = new Pair<>(a, b);
+ private static Pair<Integer, Integer> alsoMapToE = new Pair<>(b, a);
+ private static Pair<Integer, Integer> firstEntryNull = new Pair<>(null, 144);
+ private static Pair<Integer, Integer> secondEntryNull = new Pair<>(144, null);
+ private static Pair<Integer, Integer> nonNull = new Pair<>(15, 144);
@org.junit.Test
public void testConstructor() {
@@ -58,7 +58,7 @@ public class PairTest {
@org.junit.Test
public void testSetters() {
- Pair<Integer, Integer> newPair = new Pair<Integer, Integer>(0, 0);
+ Pair<Integer, Integer> newPair = new Pair<>(0, 0);
newPair.setFirst(a);
newPair.setSecond(b);
Assert.assertTrue(a.equals(newPair.getFirst()));
@@ -70,7 +70,7 @@ public class PairTest {
@org.junit.Test
public void testHashCorrectness() {
- HashMap<Pair<Integer, Integer>, Double> hash = new HashMap<Pair<Integer, Integer>, Double>();
+ HashMap<Pair<Integer, Integer>, Double> hash = new HashMap<>();
hash.put(mapToPi, Math.PI);
hash.put(mapToE, Math.E);
Assert.assertTrue(hash.get(mapToPi).equals(Math.PI));
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java
index 5e74549abc8..7364e13d719 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTest.java
@@ -158,10 +158,10 @@ public class PropertyStoreTest {
PropertyStoreTestUtil.createPropertyStore(PropertyStoreTestUtil.convertPropertiesToMap(System.getProperties()));
store1.put("key9", nested);
- Set<String> set1 = new TreeSet<String>(store1.keySet());
+ Set<String> set1 = new TreeSet<>(store1.keySet());
PropertyStoreTestUtil.checkArrays(new String[] {"key1", "key2", "key3", "key4", "key5", "key6", "key6.5"},
set1.toArray(new String[set1.size()]));
- Set<String> set2 = new TreeSet<String>(store1.arrayKeySet());
+ Set<String> set2 = new TreeSet<>(store1.arrayKeySet());
PropertyStoreTestUtil.checkArrays(new String[] {"key7", "key8"}, set2.toArray(new String[set2.size()]));
Assert.assertEquals("myId", store1.getId());
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java
index b412c4f617c..3c051937e8a 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreTestUtil.java
@@ -82,7 +82,7 @@ public final class PropertyStoreTestUtil {
}
public static Map<String, Object> convertPropertiesToMap(Properties props) {
- Map<String, Object> result = new TreeMap<String, Object>();
+ Map<String, Object> result = new TreeMap<>();
for (Entry<Object, Object> entry : props.entrySet()) {
result.put((String) entry.getKey(), entry.getValue());
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java
index 0c20ce4c1c3..ab1786385bd 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java
@@ -22,14 +22,14 @@ public class QuadTest {
private final Integer b = 233;
private final Integer c = 433;
private final Integer d = 555;
- private final Quad<Integer, Integer, Integer, Integer> mapToPi = new Quad<Integer, Integer, Integer, Integer>(a, b,
+ private final Quad<Integer, Integer, Integer, Integer> mapToPi = new Quad<>(a, b,
c, d);
- private final Quad<Integer, Integer, Integer, Integer> mapToE = new Quad<Integer, Integer, Integer, Integer>(b, c,
+ private final Quad<Integer, Integer, Integer, Integer> mapToE = new Quad<>(b, c,
d, a);
- private final Quad<Integer, Integer, Integer, Integer> alsoMapToPi = new Quad<Integer, Integer, Integer, Integer>(a,
+ private final Quad<Integer, Integer, Integer, Integer> alsoMapToPi = new Quad<>(a,
b, c, d);
- private final Quad<Integer, Integer, Integer, Integer> alsoMapToE = new Quad<Integer, Integer, Integer, Integer>(b,
+ private final Quad<Integer, Integer, Integer, Integer> alsoMapToE = new Quad<>(b,
c, d, a);
private final Quad<Integer, Integer, Integer, Integer> firstEntryNull =
@@ -40,7 +40,7 @@ public class QuadTest {
new Quad<Integer, Integer, Integer, Integer>(111, 222, null, 444);
private final Quad<Integer, Integer, Integer, Integer> fourthEntryNull =
new Quad<Integer, Integer, Integer, Integer>(111, 222, 333, null);
- private final Quad<Integer, Integer, Integer, Integer> nonNull = new Quad<Integer, Integer, Integer, Integer>(111,
+ private final Quad<Integer, Integer, Integer, Integer> nonNull = new Quad<>(111,
222, 333, 444);
@org.junit.Test
@@ -97,7 +97,7 @@ public class QuadTest {
@org.junit.Test
public void testSetters() {
- Quad<Integer, Integer, Integer, Integer> newPair = new Quad<Integer, Integer, Integer, Integer>(0, 0, 0, 0);
+ Quad<Integer, Integer, Integer, Integer> newPair = new Quad<>(0, 0, 0, 0);
newPair.setFirst(a);
newPair.setSecond(b);
newPair.setThird(c);
@@ -124,7 +124,7 @@ public class QuadTest {
Assert.assertFalse(d.equals(newPair.getSecond()));
Assert.assertFalse(d.equals(newPair.getThird()));
- Quad<Integer, Integer, Integer, Integer> anotherPair = new Quad<Integer, Integer, Integer, Integer>(0, 0, 0, 0);
+ Quad<Integer, Integer, Integer, Integer> anotherPair = new Quad<>(0, 0, 0, 0);
Assert.assertTrue(anotherPair.set(a, b, c, d).equals(anotherPair));
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java
index bc8639b1587..8be1f8cee5e 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/ResultSetIterableTest.java
@@ -41,8 +41,8 @@ public class ResultSetIterableTest {
public void init() {
MockitoAnnotations.initMocks(this);
- data = new LinkedHashSet<String>();
- result = new ResultSetIterable<String>(data);
+ data = new LinkedHashSet<>();
+ result = new ResultSetIterable<>(data);
}
@Test
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java
index 95ddcd9e73d..2fa52259323 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java
@@ -21,19 +21,19 @@ public class TripletTest {
private final Integer a = 144;
private final Integer b = 233;
private final Integer c = 533;
- private final Triplet<Integer, Integer, Integer> mapToPi = new Triplet<Integer, Integer, Integer>(a, b, c);
- private final Triplet<Integer, Integer, Integer> mapToE = new Triplet<Integer, Integer, Integer>(b, c, a);
+ private final Triplet<Integer, Integer, Integer> mapToPi = new Triplet<>(a, b, c);
+ private final Triplet<Integer, Integer, Integer> mapToE = new Triplet<>(b, c, a);
- private final Triplet<Integer, Integer, Integer> alsoMapToPi = new Triplet<Integer, Integer, Integer>(a, b, c);
- private final Triplet<Integer, Integer, Integer> alsoMapToE = new Triplet<Integer, Integer, Integer>(b, c, a);
+ private final Triplet<Integer, Integer, Integer> alsoMapToPi = new Triplet<>(a, b, c);
+ private final Triplet<Integer, Integer, Integer> alsoMapToE = new Triplet<>(b, c, a);
- private final Triplet<Integer, Integer, Integer> firstEntryNull = new Triplet<Integer, Integer, Integer>(null, 222,
+ private final Triplet<Integer, Integer, Integer> firstEntryNull = new Triplet<>(null, 222,
333);
- private final Triplet<Integer, Integer, Integer> secondEntryNull = new Triplet<Integer, Integer, Integer>(111, null,
+ private final Triplet<Integer, Integer, Integer> secondEntryNull = new Triplet<>(111, null,
333);
- private final Triplet<Integer, Integer, Integer> thirdEntryNull = new Triplet<Integer, Integer, Integer>(111, 222,
+ private final Triplet<Integer, Integer, Integer> thirdEntryNull = new Triplet<>(111, 222,
null);
- private final Triplet<Integer, Integer, Integer> nonNull = new Triplet<Integer, Integer, Integer>(111, 222, 333);
+ private final Triplet<Integer, Integer, Integer> nonNull = new Triplet<>(111, 222, 333);
@org.junit.Test
public void testConstructor() {
@@ -71,7 +71,7 @@ public class TripletTest {
@org.junit.Test
public void testSetters() {
- Triplet<Integer, Integer, Integer> newPair = new Triplet<Integer, Integer, Integer>(0, 0, 0);
+ Triplet<Integer, Integer, Integer> newPair = new Triplet<>(0, 0, 0);
newPair.setFirst(a);
newPair.setSecond(b);
newPair.setThird(c);
@@ -89,7 +89,7 @@ public class TripletTest {
Assert.assertFalse(c.equals(newPair.getFirst()));
Assert.assertFalse(c.equals(newPair.getSecond()));
- Triplet<Integer, Integer, Integer> anotherPair = new Triplet<Integer, Integer, Integer>(0, 0, 0);
+ Triplet<Integer, Integer, Integer> anotherPair = new Triplet<>(0, 0, 0);
Assert.assertTrue(anotherPair.set(a, b, c).equals(anotherPair));
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java
index 78c9791055b..f9b872f64f6 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CollectionsTest.java
@@ -106,13 +106,13 @@ public class CollectionsTest {
@Test
public void test_flatten() {
- Collection<Object> deepList = new ArrayList<Object>();
+ Collection<Object> deepList = new ArrayList<>();
deepList.add("A");
deepList.add(Arrays.asList("B", "C"));
deepList.add(Arrays.asList("D"));
deepList.add(Arrays.asList("E"));
- List<Object> flattened = new ArrayList<Object>();
+ List<Object> flattened = new ArrayList<>();
Collections.flatten(deepList, flattened);
List<Object> expected = Collections.castAll(Object.class, getTestList());
@@ -121,7 +121,7 @@ public class CollectionsTest {
}
private List<String> getTestList() {
- List<String> newList = new ArrayList<String>();
+ List<String> newList = new ArrayList<>();
newList.addAll(Arrays.asList("A", "B", "C", "D", "E"));
return newList;
}
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java
index 3658d0109f4..9987a440d3b 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/CompareTest.java
@@ -48,7 +48,7 @@ public class CompareTest {
@Parameters
public static Collection<Object[]> data() {
- Collection<Object[]> data = new ArrayList<Object[]>();
+ Collection<Object[]> data = new ArrayList<>();
data.add(new Object[] {"abc", "abc", false});
data.add(new Object[] {"abc", "abc1", true});
data.add(new Object[] {null, "abc", true});
@@ -77,10 +77,10 @@ public class CompareTest {
}
private static Map<Object, Collection<Object>> map(Object key, Object... values) {
- Map<Object, Collection<Object>> map = new HashMap<Object, Collection<Object>>();
+ Map<Object, Collection<Object>> map = new HashMap<>();
Collection<Object> objects = map.get(key);
if (objects == null) {
- objects = new ArrayList<Object>();
+ objects = new ArrayList<>();
map.put(key, objects);
} else {
objects.clear();
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java
index dd03f7d2bc4..b885fc0d775 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/DateIteratorTest.java
@@ -35,7 +35,7 @@ public class DateIteratorTest {
private final int calendarFieldNormalize; //If normalize==false then this will be ignored
private final int calendarValueNormalize; //If normalize==false then this will be ignored
- // private final List<Calendar> calsExpected = new ArrayList<Calendar>();
+ // private final List<Calendar> calsExpected = new ArrayList<>();
public DateIteratorTest(Calendar startCal, Calendar endCal, int calendarFieldIter, int iterRate, boolean normalize, int calendarFieldNormalize, int calendarValueNormalize) {
this.startCal = startCal;
@@ -50,8 +50,8 @@ public class DateIteratorTest {
@Test
public void testDefaultDateIterationOverCenturyYearChange() {
//Collection object to retain the iterated dates from the DateIterator
- List<Calendar> calsFromIter = new ArrayList<Calendar>();
- List<Calendar> calsExpected = new ArrayList<Calendar>();
+ List<Calendar> calsFromIter = new ArrayList<>();
+ List<Calendar> calsExpected = new ArrayList<>();
//Generate expected output
Calendar iCal = (Calendar) startCal.clone();
@@ -102,7 +102,7 @@ public class DateIteratorTest {
@Parameters
public static Collection<Object[]> dateIterationTestData() {
- Collection<Object[]> data = new ArrayList<Object[]>();
+ Collection<Object[]> data = new ArrayList<>();
Calendar startCal = Calendar.getInstance();
Calendar endCal = Calendar.getInstance();
@@ -181,8 +181,8 @@ public class DateIteratorTest {
// String start = DateUtil.get(startCal.getTime());
// String end = DateUtil.get(endCal.getTime());
//
- // List<Calendar> calsFromIter = new ArrayList<Calendar>();
- // List<Calendar> calsExpected = new ArrayList<Calendar>();
+ // List<Calendar> calsFromIter = new ArrayList<>();
+ // List<Calendar> calsExpected = new ArrayList<>();
//
// //Populate calsExpected -
// // Every day between startCal and endCal
@@ -241,8 +241,8 @@ public class DateIteratorTest {
// String start = DateUtil.get(startCal.getTime());
// String end = DateUtil.get(endCal.getTime());
//
- // List<Calendar> calsFromIter = new ArrayList<Calendar>();
- // List<Calendar> calsExpected = new ArrayList<Calendar>();
+ // List<Calendar> calsFromIter = new ArrayList<>();
+ // List<Calendar> calsExpected = new ArrayList<>();
//
// //Populate calsExpected -
// // All Mondays between startCal and endCal. Including first Monday prior to startCal and first Monday after endCal
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java
index 888770ff0b0..efa2c96a561 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/HashCollectionTest.java
@@ -28,7 +28,7 @@ public class HashCollectionTest {
*/
@Test
public void testPutKV() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
+ HashCollection<String, String> collection = new HashCollection<>();
Assert.assertEquals(0, collection.size());
Assert.assertEquals(0, collection.getValues().size());
@@ -50,8 +50,8 @@ public class HashCollectionTest {
*/
@Test
public void testPutKCollectionOfV() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
- List<String> values = new ArrayList<String>();
+ HashCollection<String, String> collection = new HashCollection<>();
+ List<String> values = new ArrayList<>();
for (int x = 1; x <= 5; x++) {
values.add("value " + x);
@@ -70,7 +70,7 @@ public class HashCollectionTest {
*/
@Test
public void testRemoveValue() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
+ HashCollection<String, String> collection = new HashCollection<>();
for (int x = 1; x <= 5; x++) {
collection.put("key", "value " + x);
}
@@ -85,7 +85,7 @@ public class HashCollectionTest {
*/
@Test
public void testRemoveValues() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
+ HashCollection<String, String> collection = new HashCollection<>();
for (int x = 1; x <= 5; x++) {
collection.put("key", "value " + x);
}
@@ -100,7 +100,7 @@ public class HashCollectionTest {
*/
@Test
public void testKeySet() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
+ HashCollection<String, String> collection = new HashCollection<>();
for (int x = 1; x <= 5; x++) {
collection.put("key", "value " + x);
}
@@ -115,7 +115,7 @@ public class HashCollectionTest {
*/
@Test
public void testClear() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
+ HashCollection<String, String> collection = new HashCollection<>();
for (int x = 1; x <= 5; x++) {
collection.put("key", "value " + x);
}
@@ -130,7 +130,7 @@ public class HashCollectionTest {
*/
@Test
public void testContainsKey() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
+ HashCollection<String, String> collection = new HashCollection<>();
for (int x = 1; x <= 5; x++) {
collection.put("key", "value " + x);
}
@@ -142,7 +142,7 @@ public class HashCollectionTest {
*/
@Test
public void testIsEmpty() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
+ HashCollection<String, String> collection = new HashCollection<>();
Assert.assertTrue(collection.isEmpty());
collection.put("key", "value 1");
Assert.assertFalse(collection.isEmpty());
@@ -155,7 +155,7 @@ public class HashCollectionTest {
*/
@Test
public void testContainsValue() {
- HashCollection<String, String> collection = new HashCollection<String, String>();
+ HashCollection<String, String> collection = new HashCollection<>();
for (int x = 1; x <= 5; x++) {
collection.put("key", "value " + x);
}
@@ -165,7 +165,7 @@ public class HashCollectionTest {
@Test
public void testHashCollectionObject() {
- HashCollection<Object, String> collection = new HashCollection<Object, String>();
+ HashCollection<Object, String> collection = new HashCollection<>();
Assert.assertEquals(0, collection.size());
Assert.assertEquals(0, collection.getValues().size());
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java
index 50b7782d42d..fdad16ccd25 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/UrlQueryTest.java
@@ -66,7 +66,7 @@ public class UrlQueryTest {
Assert.assertFalse(query.containsKey("dummy"));
Enumeration<String> keys = query.getParameterNames();
- Set<String> data = new HashSet<String>();
+ Set<String> data = new HashSet<>();
while (keys.hasMoreElements()) {
data.add(keys.nextElement());
}
@@ -75,7 +75,7 @@ public class UrlQueryTest {
for (Entry<String, List<String>> entry : expected.entrySet()) {
String[] values = query.getParameterValues(entry.getKey());
- List<String> actual = new ArrayList<String>();
+ List<String> actual = new ArrayList<>();
actual.addAll(Arrays.asList(values));
java.util.Collections.sort(actual);
@@ -87,7 +87,7 @@ public class UrlQueryTest {
for (Entry<String, String[]> entry : query.getParameterMap().entrySet()) {
- List<String> actual = new ArrayList<String>();
+ List<String> actual = new ArrayList<>();
actual.addAll(Arrays.asList(entry.getValue()));
java.util.Collections.sort(actual);
@@ -110,7 +110,7 @@ public class UrlQueryTest {
@Parameters
public static List<Object[]> getData() {
- List<Object[]> data = new LinkedList<Object[]>();
+ List<Object[]> data = new LinkedList<>();
add(data, "phrase=Hello+Dude&value1=%2212345%22&value2=4%3C6",
new TestData().put("phrase", "Hello Dude").put("value1", "\"12345\"").put("value2", "4<6"));
add(data, "query+name=Hello+dude&query+name=one+more+string",
@@ -123,12 +123,12 @@ public class UrlQueryTest {
}
private static final class TestData {
- private final Map<String, List<String>> data = new TreeMap<String, List<String>>();
+ private final Map<String, List<String>> data = new TreeMap<>();
public TestData put(String key, String... values) {
List<String> vals = get(key);
if (vals == null) {
- vals = new ArrayList<String>();
+ vals = new ArrayList<>();
data.put(key, vals);
}
for (String value : values) {
diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java
index 9341e6a51ac..2a9986127b4 100644
--- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java
+++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/util/annotation/AnnotationProcessorTest.java
@@ -30,7 +30,7 @@ public class AnnotationProcessorTest {
@Before
public void setup() {
- annotationHandlers = new HashMap<Class<? extends Annotation>, FieldAnnotationHandler<?>>();
+ annotationHandlers = new HashMap<>();
annotationHandlers.put(Annotation1.class, new Handler1());
annotationHandlers.put(Annotation2.class, new Handler2());

Back to the top