Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.osee.disposition.rest')
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java12
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java14
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java10
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java8
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java6
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java6
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java6
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java16
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java6
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java4
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java2
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java4
18 files changed, 53 insertions, 53 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
index 858760db061..82f5660e034 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoApiImpl.java
@@ -323,7 +323,7 @@ public class DispoApiImpl implements DispoApi {
@Override
public List<DispoAnnotationData> getDispoAnnotations(DispoProgram program, String itemId) {
- List<DispoAnnotationData> toReturn = new ArrayList<DispoAnnotationData>();
+ List<DispoAnnotationData> toReturn = new ArrayList<>();
DispoItem dispoItem = getQuery().findDispoItemById(program, itemId);
JSONArray annotationsList = dispoItem.getAnnotationsList();
try {
@@ -384,8 +384,8 @@ public class DispoApiImpl implements DispoApi {
List<DispoItem> itemsFromParse =
importer.importDirectory(nameToItemMap, new File(setToEdit.getImportPath()), report);
- List<DispoItem> itemsToCreate = new ArrayList<DispoItem>();
- List<DispoItem> itemsToEdit = new ArrayList<DispoItem>();
+ List<DispoItem> itemsToCreate = new ArrayList<>();
+ List<DispoItem> itemsToEdit = new ArrayList<>();
for (DispoItem item : itemsFromParse) {
// if the ID is non-empty then we are updating an item instead of creating a new one
@@ -448,7 +448,7 @@ public class DispoApiImpl implements DispoApi {
}
private HashMap<String, DispoItem> getItemsMap(DispoProgram program, DispoSet set) {
- HashMap<String, DispoItem> toReturn = new HashMap<String, DispoItem>();
+ HashMap<String, DispoItem> toReturn = new HashMap<>();
List<DispoItem> dispoItems = getDispoItems(program, set.getGuid());
for (DispoItem item : dispoItems) {
toReturn.put(item.getName(), item);
@@ -511,12 +511,12 @@ public class DispoApiImpl implements DispoApi {
@Override
public String copyDispoSet(DispoProgram program, DispoSet destination, DispoSet source, CopySetParams params) {
List<DispoItem> sourceItems = getDispoItems(program, source.getGuid());
- Map<String, DispoItemData> namesToDestItems = new HashMap<String, DispoItemData>();
+ Map<String, DispoItemData> namesToDestItems = new HashMap<>();
for (DispoItem itemArt : getDispoItems(program, destination.getGuid())) {
DispoItemData itemData = DispoUtil.itemArtToItemData(itemArt, true, true);
namesToDestItems.put(itemData.getName(), itemData);
}
- Map<String, DispoItem> namesToToEditItems = new HashMap<String, DispoItem>();
+ Map<String, DispoItem> namesToToEditItems = new HashMap<>();
OperationReport report = new OperationReport();
DispoSetCopier copier = new DispoSetCopier(dispoConnector);
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java
index 349a9f7423c..055e45339e8 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConfigArtifact.java
@@ -35,7 +35,7 @@ public class DispoConfigArtifact implements DispoConfig {
@Override
public List<ResolutionMethod> getValidResolutions() {
- List<ResolutionMethod> toReturn = new ArrayList<ResolutionMethod>();
+ List<ResolutionMethod> toReturn = new ArrayList<>();
List<String> attributes = artifact.getAttributeValues(CoreAttributeTypes.GeneralStringData);
String resolutionsJson = "[]";
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java
index 8abd96cb7df..94ba0e3dab4 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoConnector.java
@@ -92,7 +92,7 @@ public class DispoConnector {
@SuppressWarnings("unchecked")
private ArrayList<Integer> createDiscrepanciesList(JSONObject discrepancies) throws JSONException {
- ArrayList<Integer> toReturn = new ArrayList<Integer>();
+ ArrayList<Integer> toReturn = new ArrayList<>();
Iterator<String> iterator = discrepancies.keys();
while (iterator.hasNext()) {
String key = iterator.next();
@@ -105,7 +105,7 @@ public class DispoConnector {
}
private HashSet<Integer> getAllCoveredDiscrepanciesFromAnnotations(JSONObject discrepancies, JSONArray annotations) throws JSONException {
- HashSet<Integer> toReturn = new HashSet<Integer>();
+ HashSet<Integer> toReturn = new HashSet<>();
int length = annotations.length();
for (int j = 0; j < length; j++) {
JSONObject annotationAsObject = annotations.getJSONObject(j);
@@ -128,7 +128,7 @@ public class DispoConnector {
boolean isAllLocRefValid = true;
HashMap<Integer, String> testPointNumberToId = getPointNumbersToIds(discrepanciesList);
List<LocationRange> listOfLocationRefs = sortList(annotation.getLocationRefs());
- List<String> workingIdsOfCovered = new ArrayList<String>();
+ List<String> workingIdsOfCovered = new ArrayList<>();
for (LocationRange singleLocationRef : listOfLocationRefs) {
if (singleLocationRef.getStart() != singleLocationRef.getEnd()) {
@@ -171,7 +171,7 @@ public class DispoConnector {
@SuppressWarnings("unchecked")
private HashMap<Integer, String> getPointNumbersToIds(JSONObject discrepancies) throws JSONException {
- HashMap<Integer, String> toReturn = new HashMap<Integer, String>();
+ HashMap<Integer, String> toReturn = new HashMap<>();
Iterator<String> iterator = discrepancies.keys();
while (iterator.hasNext()) {
String key = iterator.next();
@@ -191,9 +191,9 @@ public class DispoConnector {
int firstUncoveredIndex = startIndex;
Collections.reverse(allLocationRefs);
- Stack<LocationRange> locationRefsStack = new Stack<LocationRange>();
+ Stack<LocationRange> locationRefsStack = new Stack<>();
locationRefsStack.addAll(allLocationRefs);
- List<LocationRange> allUncovered = new ArrayList<LocationRange>();
+ List<LocationRange> allUncovered = new ArrayList<>();
while (locationRefsStack.size() > 0) {
LocationRange locRef = locationRefsStack.pop();
@@ -244,7 +244,7 @@ public class DispoConnector {
private List<LocationRange> sortList(String allLocationRefsString) {
allLocationRefsString = allLocationRefsString.replaceAll("\\s*", "");
- List<LocationRange> toReturn = new ArrayList<LocationRange>();
+ List<LocationRange> toReturn = new ArrayList<>();
StringTokenizer tokenizer = new StringTokenizer(allLocationRefsString, ",");
while (tokenizer.hasMoreTokens()) {
String singleLocationRefString = tokenizer.nextToken();
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java
index 8e27a8771a5..c6c592a7094 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/DispoSetDataCleaner.java
@@ -26,7 +26,7 @@ import org.json.JSONException;
public class DispoSetDataCleaner {
public static List<DispoItem> cleanUpPcrTypes(List<DispoItem> items) {
- List<DispoItem> toModify = new ArrayList<DispoItem>();
+ List<DispoItem> toModify = new ArrayList<>();
for (DispoItem item : items) {
JSONArray annotationsList = item.getAnnotationsList();
if (checkForBadReqType(annotationsList)) {
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
index 188f1461d6a..557adeded06 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/OrcsStorageImpl.java
@@ -185,7 +185,7 @@ public class OrcsStorageImpl implements Storage {
.andTypeEquals(DispoConstants.DispoSet)//
.getResults();
- List<DispoSet> toReturn = new ArrayList<DispoSet>();
+ List<DispoSet> toReturn = new ArrayList<>();
for (ArtifactReadable art : results) {
toReturn.add(new DispoSetArtifact(art));
}
@@ -211,7 +211,7 @@ public class OrcsStorageImpl implements Storage {
ArtifactReadable setArt = findDispoArtifact(program, setId, DispoConstants.DispoSet);
ResultSet<ArtifactReadable> results = setArt.getChildren();
- List<DispoItem> toReturn = new ArrayList<DispoItem>();
+ List<DispoItem> toReturn = new ArrayList<>();
for (ArtifactReadable art : results) {
DispoItemArtifact dispoItemArtifact = new DispoItemArtifact(art);
dispoItemArtifact.getAborted();
@@ -424,7 +424,7 @@ public class OrcsStorageImpl implements Storage {
@Override
public List<IOseeBranch> getDispoBranches() {
- List<IOseeBranch> dispoBranchesNormalized = new ArrayList<IOseeBranch>();
+ List<IOseeBranch> dispoBranchesNormalized = new ArrayList<>();
BranchReadable dispoBranch = getQuery().branchQuery().andNameEquals("Dispo Parent").getResults().getExactlyOne();
ResultSet<BranchReadable> dispoBranches =
@@ -444,7 +444,7 @@ public class OrcsStorageImpl implements Storage {
public Collection<DispoItem> findDispoItemByAnnoationText(DispoProgram program, String setId, String keyword) {
ArtifactReadable dispoSetArt = findDispoArtifact(program, setId, DispoConstants.DispoSet);
- Set<DispoItem> toReturn = new HashSet<DispoItem>();
+ Set<DispoItem> toReturn = new HashSet<>();
ResultSet<ArtifactReadable> dispoArtifacts =
getQuery()//
.fromBranch(program.getUuid())//
@@ -528,7 +528,7 @@ public class OrcsStorageImpl implements Storage {
}
private Map<String, ArtifactReadable> getChildrenRecurse(List<ArtifactReadable> descendants) {
- Map<String, ArtifactReadable> toReturn = new HashMap<String, ArtifactReadable>();
+ Map<String, ArtifactReadable> toReturn = new HashMap<>();
for (ArtifactReadable descendant : descendants) {
if (!descendant.getAttributeValues(CoverageUtil.Item).isEmpty()) {
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java
index 9386cc1d953..f26a141d19d 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoItemDataCopier.java
@@ -78,7 +78,7 @@ public class DispoItemDataCopier {
private static String rebuildLocRef(JSONArray idsOfCoveredDiscrepancies, JSONObject discrepancies, HashMap<String, Integer> idsToUpdate, StringBuilder message) throws JSONException {
boolean isGaveup = false;
int length = idsOfCoveredDiscrepancies.length();
- List<Integer> testPointNumber = new ArrayList<Integer>();
+ List<Integer> testPointNumber = new ArrayList<>();
for (int i = 0; i < length; i++) {
String id = idsOfCoveredDiscrepancies.getString(i);
if (discrepancies.has(id)) {
@@ -110,7 +110,7 @@ public class DispoItemDataCopier {
private static HashMap<String, Integer> matchupOldDiscrepancies(JSONObject oldDiscrepancies, JSONObject newDiscrepancies, JSONArray annotations, StringBuilder message, Boolean needsReview) throws JSONException {
HashMap<String, Pair<Discrepancy, Boolean>> textToNewDiscrepancies =
createTextToDiscrepanciesMap(newDiscrepancies);
- HashMap<String, Integer> idsToUpdate = new HashMap<String, Integer>();
+ HashMap<String, Integer> idsToUpdate = new HashMap<>();
Iterator<String> iterator = oldDiscrepancies.keys();
while (iterator.hasNext()) {
@@ -194,7 +194,7 @@ public class DispoItemDataCopier {
@SuppressWarnings("unchecked")
private static HashMap<String, Pair<Discrepancy, Boolean>> createTextToDiscrepanciesMap(JSONObject discrepancies) throws JSONException {
- HashMap<String, Pair<Discrepancy, Boolean>> textToDiscrepancy = new HashMap<String, Pair<Discrepancy, Boolean>>();
+ HashMap<String, Pair<Discrepancy, Boolean>> textToDiscrepancy = new HashMap<>();
Iterator<String> iterator = discrepancies.keys();
while (iterator.hasNext()) {
String key = iterator.next();
@@ -202,7 +202,7 @@ public class DispoItemDataCopier {
Discrepancy discrepancy = DispoUtil.jsonObjToDiscrepancy(discrepancyAsObject);
String normalizedText = discrepancy.getText().replaceFirst(".*?\\.", ""); // Want to exclude Point number from text we match with
- Pair newPair = new Pair<Discrepancy, Boolean>(discrepancy, textToDiscrepancy.containsKey(normalizedText));
+ Pair newPair = new Pair<>(discrepancy, textToDiscrepancy.containsKey(normalizedText));
textToDiscrepancy.put(normalizedText, newPair);
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java
index 6c99f6948f4..c2796736ad6 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSaxHandler.java
@@ -26,7 +26,7 @@ public class DispoSaxHandler extends AbstractSaxHandler {
Map<String, ElementHandlers> handlers;
public DispoSaxHandler() throws Exception {
- handlers = new HashMap<String, ElementHandlers>();
+ handlers = new HashMap<>();
addHandlers(new TestPoint());
addHandlers(new Number());
addHandlers(new Result());
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java
index 25b37277749..765e3ca7dc6 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DispoSetCopier.java
@@ -44,7 +44,7 @@ public class DispoSetCopier {
}
public List<DispoItem> copyAllDispositions(Map<String, DispoItemData> nameToDestItems, Collection<DispoItem> sourceItems, boolean isCoverageCopy, OperationReport report) {
- List<DispoItem> modifiedItems = new ArrayList<DispoItem>();
+ List<DispoItem> modifiedItems = new ArrayList<>();
// Iterate through every source item since we want to try to find a match for every item in the source
for (DispoItem sourceItem : sourceItems) {
@@ -189,7 +189,7 @@ public class DispoSetCopier {
}
private Set<String> getDefaultAnnotations(DispoItemData item) throws JSONException {
- Set<String> defaultAnnotationLocations = new HashSet<String>();
+ Set<String> defaultAnnotationLocations = new HashSet<>();
JSONArray annotations = item.getAnnotationsList();
if (annotations == null) {
annotations = new JSONArray();
@@ -235,7 +235,7 @@ public class DispoSetCopier {
}
private Map<Integer, String> generateLocationToTextMap(DispoItem item) throws JSONException {
- Map<Integer, String> locationToText = new HashMap<Integer, String>();
+ Map<Integer, String> locationToText = new HashMap<>();
JSONObject discrepancies = item.getDiscrepanciesList();
@SuppressWarnings("unchecked")
Iterator<String> iterator = discrepancies.keys();
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java
index 7a90606c19a..5837733ecc4 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/ElementHandlers.java
@@ -20,7 +20,7 @@ import org.xml.sax.Attributes;
public abstract class ElementHandlers {
private final String name;
- private final List<IBaseSaxElementListener> listeners = new ArrayList<IBaseSaxElementListener>();
+ private final List<IBaseSaxElementListener> listeners = new ArrayList<>();
public ElementHandlers(String name) {
this.name = name;
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java
index 520aa0c840f..9b4ca59b26a 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java
@@ -47,7 +47,7 @@ public class TmoImporter implements DispoImporterApi {
@Override
public List<DispoItem> importDirectory(Map<String, DispoItem> exisitingItems, File tmoDirectory, OperationReport report) {
- List<DispoItem> toReturn = new LinkedList<DispoItem>();
+ List<DispoItem> toReturn = new LinkedList<>();
if (tmoDirectory.isDirectory()) {
List<File> listOfFiles = Lib.recursivelyListFiles(tmoDirectory, Pattern.compile(".*\\.tmo"));
@@ -57,7 +57,7 @@ public class TmoImporter implements DispoImporterApi {
int remainder = listOfFiles.size() % numThreads;
int startIndex = 0;
int endIndex = 0;
- List<Future<List<DispoItem>>> futures = new LinkedList<Future<List<DispoItem>>>();
+ List<Future<List<DispoItem>>> futures = new LinkedList<>();
for (int i = 0; i < numThreads; i++) {
startIndex = endIndex;
endIndex = startIndex + partitionSize;
@@ -102,7 +102,7 @@ public class TmoImporter implements DispoImporterApi {
@Override
public List<DispoItem> call() throws Exception {
- List<DispoItem> fromThread = new LinkedList<DispoItem>();
+ List<DispoItem> fromThread = new LinkedList<>();
for (File file : sublist) {
InputStream inputStream = null;
try {
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java
index 92a62cf356f..4224c352777 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmzImporter.java
@@ -54,7 +54,7 @@ public class TmzImporter implements DispoImporterApi {
@Override
public List<DispoItem> importDirectory(Map<String, DispoItem> exisitingItems, File filesDir, OperationReport report) {
- List<DispoItem> toReturn = new LinkedList<DispoItem>();
+ List<DispoItem> toReturn = new LinkedList<>();
if (!filesDir.exists() || !filesDir.isDirectory()) {
throw new OseeArgumentException("Input directory does not exists or is not a directory [%s]",
filesDir.getAbsolutePath());
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java
index 18cd11e1c09..34173d0d34b 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/CoverageAdapter.java
@@ -46,7 +46,7 @@ public class CoverageAdapter {
public List<DispoItem> copyData(Map<String, ArtifactReadable> nameToCoverageUnit, List<DispoItem> dispoItems, OperationReport report) {
Map<String, DispoItem> nameToDispoItem = getNameToDispoItemMap(dispoItems);
- List<DispoItem> modifiedItems = new ArrayList<DispoItem>();
+ List<DispoItem> modifiedItems = new ArrayList<>();
for (Entry<String, ArtifactReadable> entry : nameToCoverageUnit.entrySet()) {
DispoItem dispoItem = nameToDispoItem.get(entry.getKey());
@@ -132,7 +132,7 @@ public class CoverageAdapter {
}
private Map<String, Discrepancy> getTextToDiscrepancyMap(DispoItem dest) {
- Map<String, Discrepancy> toReturn = new HashMap<String, Discrepancy>();
+ Map<String, Discrepancy> toReturn = new HashMap<>();
JSONObject discrepanciesList = dest.getDiscrepanciesList();
@SuppressWarnings("rawtypes")
@@ -152,7 +152,7 @@ public class CoverageAdapter {
}
private Map<String, DispoItem> getNameToDispoItemMap(List<DispoItem> items) {
- Map<String, DispoItem> toReturn = new HashMap<String, DispoItem>();
+ Map<String, DispoItem> toReturn = new HashMap<>();
for (DispoItem item : items) {
toReturn.put(item.getName(), item);
}
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
index aef442118ad..f0d33b8c3f6 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
@@ -62,9 +62,9 @@ public class LisFileParser implements DispoImporterApi {
private final DispoDataFactory dataFactory;
private static final Pattern fileMethodLineNumberPattern = Pattern.compile("\\s*([0-9]+)\\s+([0-9]+)\\s+([0-9]+)");
- private final Map<String, DispoItemData> datIdToItem = new HashMap<String, DispoItemData>();
- private final Set<String> datIdsCoveredByException = new HashSet<String>();
- private final Set<String> alreadyUsedDatIds = new HashSet<String>();
+ private final Map<String, DispoItemData> datIdToItem = new HashMap<>();
+ private final Set<String> datIdsCoveredByException = new HashSet<>();
+ private final Set<String> alreadyUsedDatIds = new HashSet<>();
private final DispoConnector dispoConnector = new DispoConnector();
@@ -117,17 +117,17 @@ public class LisFileParser implements DispoImporterApi {
// This is a reimport so we'll need to copy all the annotations
if (!exisitingItems.isEmpty()) {
DispoSetCopier copier = new DispoSetCopier(dispoConnector);
- List<DispoItemData> itemsFromImport = new ArrayList<DispoItemData>();
+ List<DispoItemData> itemsFromImport = new ArrayList<>();
itemsFromImport.addAll(values);
- Map<String, DispoItemData> nameToItem = new HashMap<String, DispoItemData>();
+ Map<String, DispoItemData> nameToItem = new HashMap<>();
for (DispoItemData item : itemsFromImport) {
nameToItem.put(item.getName(), item);
}
toReturn = copier.copyAllDispositions(nameToItem, exisitingItems.values(), false, report);
} else {
- toReturn = new ArrayList<DispoItem>();
+ toReturn = new ArrayList<>();
toReturn.addAll(values);
}
return toReturn;
@@ -154,7 +154,7 @@ public class LisFileParser implements DispoImporterApi {
}
private Collection<VCastInstrumentedFile> getInstrumentedFiles(VCastDataStore dataStore, OperationReport report) {
- Collection<VCastInstrumentedFile> instrumentedFiles = new ArrayList<VCastInstrumentedFile>();
+ Collection<VCastInstrumentedFile> instrumentedFiles = new ArrayList<>();
try {
/**
* Note: the LIS_file field of the instrumentedFiles may have a fictious absolute path - but the path is
@@ -227,7 +227,7 @@ public class LisFileParser implements DispoImporterApi {
instrumentedFile.getId(), function.getId(), ex.getMessage());
}
- Map<String, JSONObject> discrepancies = new HashMap<String, JSONObject>();
+ Map<String, JSONObject> discrepancies = new HashMap<>();
for (VCastStatementCoverage statementCoverageItem : statementCoverageItems) {
processStatement(lisFile, lisFileParser, fileNum, functionNum, function, statementCoverageItem, discrepancies,
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
index c3072e3f5a9..6dff14875e0 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/ExportSet.java
@@ -148,7 +148,7 @@ public class ExportSet {
}
private Map<String, DispoAnnotationData> getDiscrepancyIdToCoveringAnnotation(DispoItem item) throws JSONException {
- Map<String, DispoAnnotationData> toReturn = new HashMap<String, DispoAnnotationData>();
+ Map<String, DispoAnnotationData> toReturn = new HashMap<>();
JSONArray annotationsList = item.getAnnotationsList();
for (int i = 0; i < annotationsList.length(); i++) {
DispoAnnotationData annotation = DispoUtil.jsonObjToDispoAnnotationData(annotationsList.getJSONObject(i));
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java
index bd14ef4d834..2cce8034218 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/OperationReport.java
@@ -21,10 +21,10 @@ import java.util.Set;
public class OperationReport {
- private final Map<String, String> itemToSummaryMap = new HashMap<String, String>();
- private final Set<String> newItems = new HashSet<String>();
+ private final Map<String, String> itemToSummaryMap = new HashMap<>();
+ private final Set<String> newItems = new HashSet<>();
private String summary;
- private final Set<String> otherMessages = new HashSet<String>();
+ private final Set<String> otherMessages = new HashSet<>();
public OperationReport() {
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java
index 3611b4b3408..fb4d5b2a0f1 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/report/STRSReport.java
@@ -93,7 +93,7 @@ public class STRSReport {
}
private HashMap<String, DispoItem> convertToMap(List<DispoItem> list) {
- HashMap<String, DispoItem> toReturn = new HashMap<String, DispoItem>();
+ HashMap<String, DispoItem> toReturn = new HashMap<>();
for (DispoItem item : list) {
toReturn.put(item.getName(), item);
}
@@ -136,7 +136,7 @@ public class STRSReport {
}
private HashMap<String, Integer> convertToIssueTypeToCounttMap(JSONArray jsonArray) {
- HashMap<String, Integer> toReturn = new HashMap<String, Integer>();
+ HashMap<String, Integer> toReturn = new HashMap<>();
int codeCount = 0;
int scriptCount = 0;
int reqCount = 0;
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java
index b2aa90a3d57..89f59a0ce3e 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/resources/DispoApplication.java
@@ -30,7 +30,7 @@ public final class DispoApplication extends Application {
private DispoApi dispoApi;
- private final Set<Object> singletons = new HashSet<Object>();
+ private final Set<Object> singletons = new HashSet<>();
public void setDispoApi(DispoApi dispoApi) {
this.dispoApi = dispoApi;
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java
index f8891520e98..bec21ee3e6f 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/util/DispoUtil.java
@@ -146,7 +146,7 @@ public final class DispoUtil {
@SuppressWarnings("unchecked")
public static String discrepanciesToString(JSONObject discrepanciesList) {
- List<Integer> discrepanciesPoints = new ArrayList<Integer>();
+ List<Integer> discrepanciesPoints = new ArrayList<>();
Iterator<String> iterator = discrepanciesList.keys();
while (iterator.hasNext()) {
try {
@@ -393,7 +393,7 @@ public final class DispoUtil {
}
public static List<DispoAnnotationData> asAnnotationsList(JSONArray annotations) {
- List<DispoAnnotationData> toReturn = new ArrayList<DispoAnnotationData>();
+ List<DispoAnnotationData> toReturn = new ArrayList<>();
for (int i = 0; i < annotations.length(); i++) {
try {
toReturn.add(jsonObjToDispoAnnotationData(annotations.getJSONObject(i)));

Back to the top