Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-09-28 14:49:18 -0400
committerRyan D. Brooks2015-09-28 14:49:18 -0400
commit071fcbc5cca4e22e650bb459701f5fc9be701013 (patch)
treeac629d866ecfea675bc4e134c68315440282d560 /plugins/org.eclipse.osee.orcs.db.test
parentb4f6f62b0d3af365b67a3786dbb24c97fa638536 (diff)
downloadorg.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.gz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.xz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.zip
refactor: Use type inference when invoking a generic constructor
Diffstat (limited to 'plugins/org.eclipse.osee.orcs.db.test')
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java38
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java4
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java10
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java6
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java2
-rw-r--r--plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java2
18 files changed, 47 insertions, 47 deletions
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java
index 232c5041503..d9612a2c206 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/intergration/PurgeAttributeTest.java
@@ -50,7 +50,7 @@ public class PurgeAttributeTest {
int prePurgeTxsCount = getCount(jdbcClient, "osee_txs");
stmt.runPreparedQuery("select attr_id from osee_attribute where value = 'Software Requirements'");
- List<Long> toPurge = new LinkedList<Long>();
+ List<Long> toPurge = new LinkedList<>();
while (stmt.next()) {
toPurge.add(stmt.getLong("attr_id"));
}
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java
index bea7678a7d0..4d60fe72078 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ChangeItemConflictTest.java
@@ -99,7 +99,7 @@ public class ChangeItemConflictTest {
@Parameters
public static List<Object[]> getData() {
- List<Object[]> data = new LinkedList<Object[]>();
+ List<Object[]> data = new LinkedList<>();
addArtifactTestCases(data);
addAttributeTestCases(data);
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java
index b3e6c774ce7..6d8ccbcac9a 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/ComputeNetChangeTest.java
@@ -35,7 +35,7 @@ import org.junit.Test;
public class ComputeNetChangeTest {
public List<TestData> getTestData() {
- List<TestData> data = new ArrayList<TestData>();
+ List<TestData> data = new ArrayList<>();
// New Or Introduced
data.add(createTest(1, entry(3L, NEW), entry(4L, NEW), entry(5L, MODIFIED), null, entry(5L, NEW), false));
@@ -96,7 +96,7 @@ public class ComputeNetChangeTest {
@Test
public void testNetChange() throws Exception {
List<TestData> data = getTestData();
- List<ChangeItem> items = new ArrayList<ChangeItem>();
+ List<ChangeItem> items = new ArrayList<>();
for (TestData testData : data) {
items.add(testData.getItem());
}
@@ -121,7 +121,7 @@ public class ComputeNetChangeTest {
@Test(expected = OseeStateException.class)
@Ignore
public void testErrorStates() throws Exception {
- List<ChangeItem> items = new ArrayList<ChangeItem>();
+ List<ChangeItem> items = new ArrayList<>();
// Source to Non-Parent commit
items.add(ChangeTestUtility.createItem(3, entry(10L, MODIFIED), null, entry(11L, MODIFIED), null, null));
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
index 7658816a58b..e29d2204f8f 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/change/MissingChangeItemFactoryTest.java
@@ -76,7 +76,7 @@ public class MissingChangeItemFactoryTest {
@Parameters
public static Collection<Object[]> data() {
- List<Object[]> params = new LinkedList<Object[]>();
+ List<Object[]> params = new LinkedList<>();
params.add(testCase_missingAttribute());
params.add(testCase_missingRelation());
params.add(testCase_deletedAttribute());
@@ -175,7 +175,7 @@ public class MissingChangeItemFactoryTest {
* This tests when a modified attribute causes its artifact and non-modified attribute to be introduced
*/
private static Object[] testCase_missingAttribute() {
- List<ChangeItem> changes = new LinkedList<ChangeItem>();
+ List<ChangeItem> changes = new LinkedList<>();
final int ci1AttrId = 1;
final int artId = 3;
final long missingGamma = 9L;
@@ -185,17 +185,17 @@ public class MissingChangeItemFactoryTest {
ChangeItemUtil.newAttributeChange(ci1AttrId, 2, artId, 4L, ModificationType.MODIFIED, Strings.EMPTY_STRING);
changes.add(ci1);
- List<AttributeData> attrDatas = new LinkedList<AttributeData>();
+ List<AttributeData> attrDatas = new LinkedList<>();
AttributeData attrData1 = createAttributeData(artId, ci1AttrId, 1L, ModificationType.MODIFIED);
AttributeData attrData2 = createAttributeData(artId, ci1AttrId + 1, missingGamma, ModificationType.INTRODUCED);
attrDatas.add(attrData1);
attrDatas.add(attrData2);
- List<ArtifactData> artData = new LinkedList<ArtifactData>();
+ List<ArtifactData> artData = new LinkedList<>();
ArtifactData artData1 = createArtifactData(artId, artGamma, ModificationType.NEW);
artData.add(artData1);
- List<ChangeItem> expected = new LinkedList<ChangeItem>();
+ List<ChangeItem> expected = new LinkedList<>();
expected.add(createExpected(attrData2));
expected.add(createExpected(artData1));
@@ -206,7 +206,7 @@ public class MissingChangeItemFactoryTest {
* create a relation change item who's artifact and other attributes and relations need to be introduced
*/
private static Object[] testCase_missingRelation() {
- List<ChangeItem> changes = new LinkedList<ChangeItem>();
+ List<ChangeItem> changes = new LinkedList<>();
final int ci1AttrId = 22;
final long missingGamma = 9L;
long artGamma = 7L;
@@ -218,25 +218,25 @@ public class MissingChangeItemFactoryTest {
ChangeItem ci1 = ChangeItemUtil.newRelationChange(relId, 0, srcGamma, ModificationType.NEW, artA, artB, "");
changes.add(ci1);
- List<AttributeData> attrDatas = new LinkedList<AttributeData>();
+ List<AttributeData> attrDatas = new LinkedList<>();
AttributeData attrData1 = createAttributeData(artA, ci1AttrId, 1L, ModificationType.MODIFIED);
AttributeData attrData2 = createAttributeData(artA, ci1AttrId + 1, missingGamma, ModificationType.INTRODUCED);
attrDatas.add(attrData1);
attrDatas.add(attrData2);
- List<ArtifactData> artData = new LinkedList<ArtifactData>();
+ List<ArtifactData> artData = new LinkedList<>();
ArtifactData artData1 = createArtifactData(artA, artGamma, ModificationType.NEW);
artData.add(artData1);
- List<RelationData> relDatas = new LinkedList<RelationData>();
+ List<RelationData> relDatas = new LinkedList<>();
RelationData relData1 = createRelationData(11, artA, artB + 1, 88, ModificationType.NEW);
relDatas.add(relData1);
- List<ArtifactData> destArtData = new LinkedList<ArtifactData>();
+ List<ArtifactData> destArtData = new LinkedList<>();
ArtifactData destArt = createArtifactData(artB + 1, 99, ModificationType.NEW);
destArtData.add(destArt);
- List<ChangeItem> expected = new LinkedList<ChangeItem>();
+ List<ChangeItem> expected = new LinkedList<>();
expected.add(createExpected(attrData1));
expected.add(createExpected(attrData2));
expected.add(createExpected(artData1));
@@ -249,24 +249,24 @@ public class MissingChangeItemFactoryTest {
* create a deleted attribute who's artifact needs to be introduced
*/
private static Object[] testCase_deletedAttribute() {
- List<ChangeItem> changes = new LinkedList<ChangeItem>();
+ List<ChangeItem> changes = new LinkedList<>();
final int artId = 3;
ChangeItem ci1 =
ChangeItemUtil.newAttributeChange(22, 2, artId, 4L, ModificationType.DELETED, Strings.EMPTY_STRING);
changes.add(ci1);
- List<AttributeData> attrDatas = new LinkedList<AttributeData>();
+ List<AttributeData> attrDatas = new LinkedList<>();
AttributeData attrData1 = createAttributeData(artId, 33, 1L, ModificationType.MODIFIED);
AttributeData attrData2 = createAttributeData(artId, 44 + 1, 67L, ModificationType.NEW);
attrDatas.add(attrData1);
attrDatas.add(attrData2);
- List<ArtifactData> artData = new LinkedList<ArtifactData>();
+ List<ArtifactData> artData = new LinkedList<>();
ArtifactData artData1 = createArtifactData(artId, 89L, ModificationType.NEW);
artData.add(artData1);
- List<ChangeItem> expected = new LinkedList<ChangeItem>();
+ List<ChangeItem> expected = new LinkedList<>();
expected.add(createExpected(attrData1));
expected.add(createExpected(attrData2));
expected.add(createExpected(artData1));
@@ -278,24 +278,24 @@ public class MissingChangeItemFactoryTest {
* create an artifact_deleted attribute who's artifact needs to be introduced deleted
*/
private static Object[] testCase_artifactDeletedAttribute() {
- List<ChangeItem> changes = new LinkedList<ChangeItem>();
+ List<ChangeItem> changes = new LinkedList<>();
final int artId = 3;
ChangeItem ci1 =
ChangeItemUtil.newAttributeChange(22, 2, artId, 4L, ModificationType.ARTIFACT_DELETED, Strings.EMPTY_STRING);
changes.add(ci1);
- List<AttributeData> attrDatas = new LinkedList<AttributeData>();
+ List<AttributeData> attrDatas = new LinkedList<>();
AttributeData attrData1 = createAttributeData(artId, 33, 1L, ModificationType.ARTIFACT_DELETED);
AttributeData attrData2 = createAttributeData(artId, 44 + 1, 67L, ModificationType.ARTIFACT_DELETED);
attrDatas.add(attrData1);
attrDatas.add(attrData2);
- List<ArtifactData> artData = new LinkedList<ArtifactData>();
+ List<ArtifactData> artData = new LinkedList<>();
ArtifactData artData1 = createArtifactData(artId, 89L, ModificationType.DELETED);
artData.add(artData1);
- List<ChangeItem> expected = new LinkedList<ChangeItem>();
+ List<ChangeItem> expected = new LinkedList<>();
expected.add(createExpected(attrData1));
expected.add(createExpected(attrData2));
expected.add(createExpected(artData1));
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java
index c66caa497ca..5d2e9912743 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/DataLoaderFactoryImplTest.java
@@ -857,7 +857,7 @@ public class DataLoaderFactoryImplTest {
assertFalse(queryId.equals(-1));
assertEquals(joinCaptor.getValue().getQueryId(), queryId);
- List<Object> queryIdsToMatch = new ArrayList<Object>();
+ List<Object> queryIdsToMatch = new ArrayList<>();
for (Object param : params) {
if (param.equals(JQID)) {
queryIdsToMatch.add(iterator.next());
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java
index a1a79a8abf6..cced8473335 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/loader/LoaderSqlHandlerFactoryUtilTest.java
@@ -58,7 +58,7 @@ public class LoaderSqlHandlerFactoryUtilTest {
@Test
public void testQueryModuleFactory() throws Exception {
- List<Criteria> criteria = new ArrayList<Criteria>();
+ List<Criteria> criteria = new ArrayList<>();
criteria.add(new CriteriaArtifact());
criteria.add(new CriteriaAttribute(null, null));
criteria.add(new CriteriaRelation(null, null));
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java
index 2cd9328f1bb..d4fd77f11a1 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/proxy/DataResourceTest.java
@@ -128,7 +128,7 @@ public class DataResourceTest {
@Parameters
public static Collection<Object[]> data() {
- Collection<Object[]> data = new ArrayList<Object[]>();
+ Collection<Object[]> data = new ArrayList<>();
data.add(new Object[] {"application/zip", "ISO-8859-1", ".zip", "http://hello.com"});
data.add(new Object[] {"txt/plain", "UTF-8", ".txt", "attr://123/1123/1231/hello.txt"});
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java
index 1d6208a231a..1ea067b6d16 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/resource/AttributeLocatorProviderTest.java
@@ -42,7 +42,7 @@ public class AttributeLocatorProviderTest {
}
private List<TestData> getTestGenerateLocatorData() {
- List<TestData> cases = new ArrayList<TestData>();
+ List<TestData> cases = new ArrayList<>();
cases.add(new TestData("1", "", null, true, null));
cases.add(new TestData("2", null, null, true, null));
cases.add(new TestData("3", null, "", true, null));
@@ -72,7 +72,7 @@ public class AttributeLocatorProviderTest {
}
private List<TestData> getTestGetResourceLocatorData() {
- List<TestData> cases = new ArrayList<TestData>();
+ List<TestData> cases = new ArrayList<>();
cases.add(new TestData("1", "", true, null));
cases.add(new TestData("2", null, true, null));
cases.add(new TestData("3", "$%#", true, null));
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java
index 61a2b7d37b1..67fae7711ce 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java
@@ -57,7 +57,7 @@ public final class SearchAsserts {
}
public static List<Pair<String, Long>> asTags(String word, long... entries) {
- List<Pair<String, Long>> data = new ArrayList<Pair<String, Long>>();
+ List<Pair<String, Long>> data = new ArrayList<>();
for (int index = 0; index < entries.length; index++) {
data.add(new Pair<String, Long>(word, entries[index]));
}
@@ -65,7 +65,7 @@ public final class SearchAsserts {
}
public static List<MatchLocation> asLocations(int... data) {
- List<MatchLocation> locations = new ArrayList<MatchLocation>();
+ List<MatchLocation> locations = new ArrayList<>();
if (data != null && data.length > 0) {
for (int index = 0; index < data.length; index++) {
locations.add(new MatchLocation(data[index], data[++index]));
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java
index 03ffdef98ac..482e4ed751b 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtilTest.java
@@ -65,7 +65,7 @@ public class SqlHandlerFactoryUtilTest {
@Test
public void testQueryModuleFactory() throws Exception {
- List<Criteria> criteria = new ArrayList<Criteria>();
+ List<Criteria> criteria = new ArrayList<>();
criteria.add(new CriteriaArtifactGuids(null));
criteria.add(new CriteriaArtifactIds(null));
criteria.add(new CriteriaRelationTypeFollow(null));
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java
index 46114ff1941..6de289dc3dc 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/consumer/IndexingTaskDatabaseTxCallableTest.java
@@ -74,7 +74,7 @@ public class IndexingTaskDatabaseTxCallableTest {
@Test
public void testTagging() throws Exception {
- ArrayList<IndexedResource> sources = new ArrayList<IndexedResource>();
+ ArrayList<IndexedResource> sources = new ArrayList<>();
sources.add(resource1);
sources.add(resource2);
when(resource1.getTypeUuid()).thenReturn(CoreAttributeTypes.Name.getGuid());
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java
index d4755c30c01..ef3ce99b6bf 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/language/EnglishLanguageTest.java
@@ -42,7 +42,7 @@ public class EnglishLanguageTest {
}
private Map<String, String> getSingularToPluralData() {
- Map<String, String> testMap = new LinkedHashMap<String, String>();
+ Map<String, String> testMap = new LinkedHashMap<>();
testMap.put("tries", "try");
testMap.put("volcanoes", "volcano");
testMap.put("geese", "goose");
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java
index 3f6f8e3238e..ecb04500355 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagEncoderTest.java
@@ -41,14 +41,14 @@ public class TagEncoderTest {
@Test
public void testTagEncoder() {
- List<Pair<String, Long>> actualTags = new ArrayList<Pair<String, Long>>();
+ List<Pair<String, Long>> actualTags = new ArrayList<>();
encoder.encode(toEncode, new MockTagCollector(actualTags));
SearchAsserts.assertTagsEqual(expected, actualTags);
}
@Parameters
public static Collection<Object[]> data() {
- List<Object[]> data = new ArrayList<Object[]>();
+ List<Object[]> data = new ArrayList<>();
data.add(new Object[] {"hello", SearchAsserts.asTags("hello", 1520625)});
data.add(new Object[] {
"what happens when we have a long string",
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java
index 8b775f56ac3..4365d705d1f 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java
@@ -52,7 +52,7 @@ public class TagProcessorTest {
@Test
public void testCollectFromString() {
- List<Pair<String, Long>> actual = new ArrayList<Pair<String, Long>>();
+ List<Pair<String, Long>> actual = new ArrayList<>();
TagCollector tagCollector = new MockTagCollector(actual);
tagProcessor.collectFromString(expectedParsed, tagCollector);
SearchAsserts.assertTagsEqual(expected, actual);
@@ -63,7 +63,7 @@ public class TagProcessorTest {
InputStream inputStream = null;
try {
inputStream = new XmlTextInputStream(rawData);
- List<Pair<String, Long>> actual = new ArrayList<Pair<String, Long>>();
+ List<Pair<String, Long>> actual = new ArrayList<>();
TagCollector tagCollector = new MockTagCollector(actual);
tagProcessor.collectFromInputStream(inputStream, tagCollector);
SearchAsserts.assertTagsEqual(expected, actual);
@@ -77,7 +77,7 @@ public class TagProcessorTest {
Scanner sourceScanner = null;
try {
sourceScanner = new Scanner(new XmlTextInputStream(rawData), "UTF-8");
- List<Pair<String, Long>> actual = new ArrayList<Pair<String, Long>>();
+ List<Pair<String, Long>> actual = new ArrayList<>();
TagCollector tagCollector = new MockTagCollector(actual);
tagProcessor.collectFromScanner(sourceScanner, tagCollector);
SearchAsserts.assertTagsEqual(expected, actual);
@@ -90,7 +90,7 @@ public class TagProcessorTest {
@Parameters
public static Collection<Object[]> data() throws Exception {
- List<Object[]> data = new ArrayList<Object[]>();
+ List<Object[]> data = new ArrayList<>();
TagProcessor tagProcess = new TagProcessor(new EnglishLanguage(new MockLog()), new TagEncoder());
for (int index = 1; index <= 9; index++) {
@@ -104,7 +104,7 @@ public class TagProcessorTest {
}
private static List<Pair<String, Long>> loadExpected(String resourceName) throws IOException {
- List<Pair<String, Long>> data = new ArrayList<Pair<String, Long>>();
+ List<Pair<String, Long>> data = new ArrayList<>();
String rawData = getResource(resourceName);
String[] entries = rawData.split("\r?\n");
for (String entry : entries) {
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java
index b5745dae8fd..41cce4ccb97 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassMatcherTest.java
@@ -63,7 +63,7 @@ public class SecondPassMatcherTest {
@Parameters
public static Collection<Object[]> data() {
- List<Object[]> data = new ArrayList<Object[]>();
+ List<Object[]> data = new ArrayList<>();
StreamMatcher matcher = MatcherFactory.createMatcher();
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java
index 8f724733c9c..9a58f157078 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/SecondPassScannerTest.java
@@ -60,7 +60,7 @@ public class SecondPassScannerTest {
@Parameters
public static Collection<Object[]> data() {
- List<Object[]> data = new ArrayList<Object[]>();
+ List<Object[]> data = new ArrayList<>();
data.add(new Object[] {
"What->does] .this. mean",
@@ -91,10 +91,10 @@ public class SecondPassScannerTest {
}
private static List<Pair<String, MatchLocation>> getExpected(List<String> tokens, int... locations) {
- List<Pair<String, MatchLocation>> toReturn = new LinkedList<Pair<String, MatchLocation>>();
+ List<Pair<String, MatchLocation>> toReturn = new LinkedList<>();
List<MatchLocation> matchLocs = SearchAsserts.asLocations(locations);
for (int i = 0; i < tokens.size(); i++) {
- Pair<String, MatchLocation> pair = new Pair<String, MatchLocation>(tokens.get(i), matchLocs.get(i));
+ Pair<String, MatchLocation> pair = new Pair<>(tokens.get(i), matchLocs.get(i));
toReturn.add(pair);
}
return toReturn;
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java
index 9606c837986..27eda1117e6 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/util/WordsUtilTest.java
@@ -114,7 +114,7 @@ public class WordsUtilTest {
@Parameters
public static Collection<Object[]> data() {
- List<Object[]> data = new ArrayList<Object[]>();
+ List<Object[]> data = new ArrayList<>();
//***WORD***
String dataWithSpecial = getSpecial(169, 174, 87, 79, 82, 68, 96, 8220, 34);
data.add(new Object[] {dataWithSpecial, 5, true, new String[] {"WORD"}});
diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java
index 4b814942c4c..5725d15d404 100644
--- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java
+++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/transaction/TransactionWriterTest.java
@@ -91,7 +91,7 @@ public class TransactionWriterTest {
stores = Arrays.asList(dao1, dao2);
- final Map<SqlOrderEnum, IdJoinQuery> joins = new LinkedHashMap<SqlOrderEnum, IdJoinQuery>();
+ final Map<SqlOrderEnum, IdJoinQuery> joins = new LinkedHashMap<>();
joins.put(SqlOrderEnum.ARTIFACTS, join1);
joins.put(SqlOrderEnum.ATTRIBUTES, join2);

Back to the top