diff options
Diffstat (limited to 'plugins/org.eclipse.osee.define/src/org')
47 files changed, 137 insertions, 137 deletions
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java index 68e837b8f41..9b081ffcbb2 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/DataRightsImporter.java @@ -74,7 +74,7 @@ public class DataRightsImporter extends AbstractBlam { QueryBuilderArtifact builder = ArtifactQuery.createQueryBuilder(branch); builder.andIsOfType(CodeUnit); ResultSet<Artifact> results = builder.getResults(); - nameToArtifact = new HashMap<String, Artifact>(); + nameToArtifact = new HashMap<>(); for (Artifact artifact : results) { nameToArtifact.put(artifact.getName(), artifact); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributeOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributeOperation.java index 068f841e4e1..580e0a341c9 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributeOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributeOperation.java @@ -77,7 +77,7 @@ public class FixAttributeOperation extends AbstractOperation { if (commitChangesBool) { transaction = TransactionManager.createTransaction(branch, "Fixing Duplicate Enumerated Types"); } - List<String[]> rowData = new ArrayList<String[]>(); + List<String[]> rowData = new ArrayList<>(); for (Entry<Artifact, Collection<IAttributeType>> entry : artifactAttributeMap.entrySet()) { Artifact artifact = entry.getKey(); @@ -149,7 +149,7 @@ public class FixAttributeOperation extends AbstractOperation { private boolean hasDuplicates(List<Object> attributeValues) { boolean result = false; - Set<Object> set = new HashSet<Object>(); + Set<Object> set = new HashSet<>(); for (Object object : attributeValues) { if (!set.add(object)) { result = true; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributesUIReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributesUIReport.java index 6d6509fdd15..db750dd1040 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributesUIReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixAttributesUIReport.java @@ -38,7 +38,7 @@ public class FixAttributesUIReport implements Display { @Override public void displayReport(String reportName, List<String[]> values) { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> columns = new ArrayList<>(); addColumn(columns, "Branch Name"); addColumn(columns, "Artifact Guid"); addColumn(columns, "Artifact Name"); @@ -46,12 +46,12 @@ public class FixAttributesUIReport implements Display { addColumn(columns, "Was Value"); addColumn(columns, "Fixed Value"); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (String[] row : values) { rows.add(new ResultsXViewerRow(row)); } - List<IResultsEditorTab> tabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> tabs = new ArrayList<>(); tabs.add(new ResultsEditorTableTab("Results", columns, rows)); ReportProvider report = new ReportProvider(reportName, tabs); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixEmbeddedLinksBlam.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixEmbeddedLinksBlam.java index 801d7721afc..8a85329b13c 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixEmbeddedLinksBlam.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/FixEmbeddedLinksBlam.java @@ -63,7 +63,7 @@ public class FixEmbeddedLinksBlam extends AbstractBlam { if (artifact.isAttributeTypeValid(CoreAttributeTypes.WholeWordContent)) { String content = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.WholeWordContent, ""); if (Strings.isValid(content)) { - Set<String> unknownGuids = new HashSet<String>(); + Set<String> unknownGuids = new HashSet<>(); content = WordMlLinkHandler.link(linkType, artifact, content, unknownGuids); artifact.setSoleAttributeFromString(CoreAttributeTypes.WholeWordContent, content); artifact.persist(tx); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java index 888fd361a68..8d6e39bd41a 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/PublishSystemLevelSSDD.java @@ -56,7 +56,7 @@ public class PublishSystemLevelSSDD extends AbstractBlam { } public PublishSystemLevelSSDD() { - subsystemToRequirements = new HashCollection<Artifact, Artifact>(false, LinkedList.class); + subsystemToRequirements = new HashCollection<>(false, LinkedList.class); } private void init() throws IOException { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java index df174f7db1c..84bdc995717 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/RequirementsTestReport.java @@ -144,7 +144,7 @@ public class RequirementsTestReport extends AbstractBlam { } private void load() throws OseeCoreException { - requirementsBulkLoad = new ArrayList<Artifact>(); + requirementsBulkLoad = new ArrayList<>(); for (Artifact input : inputArtifacts) { requirementsBulkLoad.addAll(input.getDescendants()); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java index d6c00f2219e..7c3489859b0 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemFullTraceReport.java @@ -64,7 +64,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { private HashCollection<Artifact, String> requirementsToCodeUnits; private static int SOFTWARE_REQUIREMENT_INDEX = 9; private static int TEST_INDEX = 13; - private final ArrayList<String> tests = new ArrayList<String>(50); + private final ArrayList<String> tests = new ArrayList<>(50); private final String SCRIPT_ROOT_DIR = "Script Root Directory"; private final String USE_TRACE_IN_OSEE = "Use traceability from Subsystem Requirements"; @@ -97,7 +97,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { String scriptDir = variableMap.getString(SCRIPT_ROOT_DIR); Boolean checked = variableMap.getBoolean(USE_TRACE_IN_OSEE); - Collection<TraceHandler> traceHandlers = new LinkedList<TraceHandler>(); + Collection<TraceHandler> traceHandlers = new LinkedList<>(); for (String handler : availableTraceHandlers) { if (variableMap.getBoolean(handler)) { TraceHandler traceHandler = TraceUnitExtensionManager.getInstance().getTraceHandlerByName(handler); @@ -124,7 +124,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { } private List<Artifact> prepareSubsystemRequirements(List<Artifact> artifacts) throws OseeCoreException { - List<Artifact> subsystemRequirements = new ArrayList<Artifact>(400); + List<Artifact> subsystemRequirements = new ArrayList<>(400); for (Artifact artifact : artifacts) { if (artifact.isOfType(CoreArtifactTypes.Folder)) { subsystemRequirements.addAll(artifact.getDescendants()); @@ -217,7 +217,7 @@ public class SubsystemFullTraceReport extends AbstractBlam { sb.append("<xWidgets>"); sb.append("<XWidget xwidgetType=\"XCheckBox\" displayName=\"" + USE_TRACE_IN_OSEE + "\" defaultValue=\"true\" labelAfter=\"true\" horizontalLabel=\"true\" />"); sb.append("<XWidget xwidgetType=\"XText\" displayName=\"" + SCRIPT_ROOT_DIR + "\" defaultValue=\"C:/UserData/workspaceScripts\" toolTip=\"Leave blank if test script traceability is not needed.\" />"); - availableTraceHandlers = new LinkedList<String>(); + availableTraceHandlers = new LinkedList<>(); sb.append("<XWidget xwidgetType=\"XLabel\" displayName=\"Select appropriate script parser (if script traceability needed):\" />"); Collection<String> traceHandlerNames = TraceUnitExtensionManager.getInstance().getAllTraceHandlerNames(); for (String handler : traceHandlerNames) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java index dd63643eda9..f3f486996d0 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SubsystemToLowLevelReqTraceReport.java @@ -59,9 +59,9 @@ public class SubsystemToLowLevelReqTraceReport extends AbstractBlam { } public SubsystemToLowLevelReqTraceReport() { - subsysToSubsysReqsMap = new HashMap<String, List<Artifact>>(); - components = new HashSet<Artifact>(); - lowLevelReqs = new ArrayList<Artifact>(1000); + subsysToSubsysReqsMap = new HashMap<>(); + components = new HashSet<>(); + lowLevelReqs = new ArrayList<>(1000); } private void init() throws IOException { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java index 552f516b465..2463a72bb2f 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/SystemSubsystemReport.java @@ -77,9 +77,9 @@ public class SystemSubsystemReport extends AbstractBlam { private static final int COMP_ENUM_COUNT = SubsystemCompletness.values().length; public SystemSubsystemReport() { - subsysToSubsysReqsMap = new HashMap<String, Set<Artifact>>(); - subsysToSysReqsMap = new HashMap<String, Set<Artifact>>(); - components = new LinkedHashSet<Artifact>(250); + subsysToSubsysReqsMap = new HashMap<>(); + subsysToSysReqsMap = new HashMap<>(); + components = new LinkedHashSet<>(250); } private void init() throws IOException { @@ -132,7 +132,7 @@ public class SystemSubsystemReport extends AbstractBlam { } private void storeInHierarchyOrderBySubsystem(String subSysName, List<Artifact> sysReqByComp) { - Set<Artifact> orderedSysReqs = new LinkedHashSet<Artifact>(sysReqByComp.size()); + Set<Artifact> orderedSysReqs = new LinkedHashSet<>(sysReqByComp.size()); for (Artifact sysReq : sysReqs) { if (sysReqByComp.contains(sysReq)) { orderedSysReqs.add(sysReq); @@ -156,7 +156,7 @@ public class SystemSubsystemReport extends AbstractBlam { "Req GUID not allocated"}; excelWriter.writeRow(row); - CountingMap<Artifact> allocatedSysReqCounter = new CountingMap<Artifact>(sysReqs.size()); + CountingMap<Artifact> allocatedSysReqCounter = new CountingMap<>(sysReqs.size()); for (Artifact subsysFolder : subsysTopFolder.getChildren()) { resetCounters(); @@ -168,7 +168,7 @@ public class SystemSubsystemReport extends AbstractBlam { List<Artifact> sysReqByComp = component.getRelatedArtifacts(CoreRelationTypes.Allocation__Requirement); storeInHierarchyOrderBySubsystem(subSysName, sysReqByComp); allocatedSysReqCounter.put(sysReqByComp); - Set<String> missingAllocationGuids = new LinkedHashSet<String>(); + Set<String> missingAllocationGuids = new LinkedHashSet<>(); recurseWholeSubsystem(subSysName, subsysFolder, missingAllocationGuids); @@ -313,7 +313,7 @@ public class SystemSubsystemReport extends AbstractBlam { } private void recurseWholeSubsystem(String subSysName, Artifact subsysFolder, Set<String> missingAllocationGuids) throws OseeCoreException { - Set<Artifact> subsysReqs = new LinkedHashSet<Artifact>(); + Set<Artifact> subsysReqs = new LinkedHashSet<>(); subsysToSubsysReqsMap.put(subSysName, subsysReqs); countDescendants(subSysName, subsysReqs, subsysFolder, missingAllocationGuids); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestPlanComplianceReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestPlanComplianceReport.java index 902d7dd8cad..179a26a8f38 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestPlanComplianceReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestPlanComplianceReport.java @@ -114,7 +114,7 @@ public final class TestPlanComplianceReport extends AbstractBlam { } private void writeRow(String testPlan, List<String> perfSpecs, List<String> pids, List<String> testProcNames, List<String> testProcStatuses, List<String> testResultNames, List<String> errors) throws IOException { - List<List<List<String>>> allPartitions = new LinkedList<List<List<String>>>(); + List<List<List<String>>> allPartitions = new LinkedList<>(); allPartitions.add(Lists.partition(perfSpecs, maxRowsPerCell)); allPartitions.add(Lists.partition(pids, maxRowsPerCell)); allPartitions.add(Lists.partition(testProcNames, maxRowsPerCell)); @@ -161,9 +161,9 @@ public final class TestPlanComplianceReport extends AbstractBlam { } private TestStatusAndResults calculateTestStatusAndResults(List<Artifact> testProcedures) { - List<String> testProcStatus = new LinkedList<String>(); - List<String> testResultNames = new LinkedList<String>(); - List<String> errors = new LinkedList<String>(); + List<String> testProcStatus = new LinkedList<>(); + List<String> testResultNames = new LinkedList<>(); + List<String> errors = new LinkedList<>(); for (Artifact testProc : testProcedures) { String status = testProc.getSoleAttributeValue(CoreAttributeTypes.TestProcedureStatus, BLANK_SPACE); Collection<Artifact> testResults = @@ -215,7 +215,7 @@ public final class TestPlanComplianceReport extends AbstractBlam { private List<String> getRequirementsAsString(Artifact testPlan, IRelationTypeSide rts) throws OseeCoreException { Collection<Artifact> requirementArtifacts = testPlan.getRelatedArtifacts(rts); - List<String> requirementNames = new ArrayList<String>(); + List<String> requirementNames = new ArrayList<>(); for (Artifact req : requirementArtifacts) { String paragraphNumber = req.getSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, ""); requirementNames.add(paragraphNumber + BLANK_SPACE + req.getName()); @@ -280,7 +280,7 @@ public final class TestPlanComplianceReport extends AbstractBlam { } private void load() throws OseeCoreException { - testPlans = new ArrayList<Artifact>(); + testPlans = new ArrayList<>(); for (Artifact input : inputArtifacts) { testPlans.addAll(input.getDescendants()); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestStatusEnum.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestStatusEnum.java index 6e0eda5637b..8a63a841d00 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestStatusEnum.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/blam/operation/TestStatusEnum.java @@ -21,7 +21,7 @@ public enum TestStatusEnum { COMPLETED_WITH_ISSUES_CODE("Completed -- With Issues"), COMPLETED_WITH_ISSUES_RESOLVED_CODE("Completed -- With Issues Resolved"), PARTIALLY_COMPLETED_CODE("Partially Complete"); - private final static Map<String, TestStatusEnum> testStatusToCodeMap = new HashMap<String, TestStatusEnum>(); + private final static Map<String, TestStatusEnum> testStatusToCodeMap = new HashMap<>(); public String testStatus; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/errorhandler/ErrorHandler.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/errorhandler/ErrorHandler.java index 0b7a080ae75..ed7b0b72571 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/errorhandler/ErrorHandler.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/errorhandler/ErrorHandler.java @@ -23,7 +23,7 @@ public class ErrorHandler { */ public ErrorHandler() { super(); - this.set = new HashSet<Resolver>(); + this.set = new HashSet<>(); this.value = new StateValue(); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateViewItems.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateViewItems.java index ac1dc7c7513..9ed63af241c 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateViewItems.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateViewItems.java @@ -37,7 +37,7 @@ import org.osgi.framework.Bundle; * @author Donald G. Dunne */ public class DefineNavigateViewItems implements XNavigateViewItems, IXNavigateCommonItem { - private final List<XNavigateItem> items = new CopyOnWriteArrayList<XNavigateItem>(); + private final List<XNavigateItem> items = new CopyOnWriteArrayList<>(); @Override public List<XNavigateItem> getSearchNavigateItems() { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java index 7b52fd05f8b..a27e2740dcb 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/relation/Import/ExtractTestRelations.java @@ -52,7 +52,7 @@ public class ExtractTestRelations { } public void run() { - ArrayList<String> patterns = new ArrayList<String>(); + ArrayList<String> patterns = new ArrayList<>(); patterns.add(scriptsDir); Find app = new Find("RequirementId\\(\\\"([^\\\"]+)\\\"", new File(scriptsDir), fileNamePattern); app.find(999999, true); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ArtifactOperations.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ArtifactOperations.java index cd8997db2a8..3578fe20db5 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ArtifactOperations.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ArtifactOperations.java @@ -97,7 +97,7 @@ public class ArtifactOperations { public List<String> getPartitions() { if (partitions == null) { - partitions = new ArrayList<String>(); + partitions = new ArrayList<>(); try { partitions.addAll(artifact.getAttributesToStringList(CoreAttributeTypes.Partition)); if (partitions.isEmpty()) { @@ -151,7 +151,7 @@ public class ArtifactOperations { } public static HashCollection<String, Artifact> sortByPartition(Collection<Artifact> source) { - HashCollection<String, Artifact> partitionMap = new HashCollection<String, Artifact>(false, TreeSet.class); + HashCollection<String, Artifact> partitionMap = new HashCollection<>(false, TreeSet.class); for (Artifact artifact : source) { ArtifactOperations operator = new ArtifactOperations(artifact); List<String> partitions = operator.getPartitions(); @@ -163,7 +163,7 @@ public class ArtifactOperations { } public static List<Artifact> sortByParagraphNumbers(Collection<Artifact> source) { - List<Artifact> toReturn = new ArrayList<Artifact>(source); + List<Artifact> toReturn = new ArrayList<>(source); Collections.sort(toReturn, new Comparator<Artifact>() { @Override public int compare(Artifact art1, Artifact art2) { @@ -199,7 +199,7 @@ public class ArtifactOperations { } private static Integer[] getParagraphIndices(String paragraph) { - List<Integer> paragraphs = new ArrayList<Integer>(); + List<Integer> paragraphs = new ArrayList<>(); if (Strings.isValid(paragraph)) { String[] values = paragraph.split("\\."); for (int index = 0; index < values.length; index++) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java index a4fa33aef75..dbc0d46e630 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/BranchTraceabilityOperation.java @@ -88,15 +88,15 @@ public class BranchTraceabilityOperation extends TraceabilityProviderOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { requirementData.initialize(monitor); - requirementToTestUnitsMap = new HashCollection<Artifact, String>(); + requirementToTestUnitsMap = new HashCollection<>(); List<Artifact> unitsOnBranch = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.TestCase, branch); - testUnits = new HashMap<String, Artifact>(); + testUnits = new HashMap<>(); for (Artifact unit : unitsOnBranch) { testUnits.put(convertToJavaFileName(unit.getName()), unit); } - List<Artifact> reqs = new ArrayList<Artifact>(); + List<Artifact> reqs = new ArrayList<>(); for (IArtifactType type : types) { if (withInheritance) { reqs.addAll(ArtifactQuery.getArtifactListFromTypeWithInheritence(type, branch, DeletionFlag.EXCLUDE_DELETED)); @@ -107,7 +107,7 @@ public class BranchTraceabilityOperation extends TraceabilityProviderOperation { for (Artifact req : reqs) { List<Artifact> verifiers = req.getRelatedArtifacts(CoreRelationTypes.Verification__Verifier); - Collection<String> verifierNames = new HashSet<String>(); + Collection<String> verifierNames = new HashSet<>(); String inspection = getInspectionQual(req); if (Strings.isValid(inspection)) { verifierNames.add(inspection); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java index 84af0ec3a7e..48cbecdc815 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/HierarchyHandler.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.skynet.core.utility.Requirements; */ public final class HierarchyHandler { private static final Matcher subsystemMatcher = Pattern.compile("(\\w*)\\.ss").matcher(""); - private final Map<String, Artifact> folderNameToArtifact = new HashMap<String, Artifact>(50); + private final Map<String, Artifact> folderNameToArtifact = new HashMap<>(50); private final SkynetTransaction transaction; private final IOseeBranch branch; private Artifact root; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java index ef387d285d4..b30fbd39164 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityPage.java @@ -60,7 +60,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage { setTitle("Import traceability into OSEE Define"); setDescription("Import relations between artifacts"); - traceUnitHandlers = new HashMap<Button, Boolean>(); + traceUnitHandlers = new HashMap<>(); if (selection != null && selection.size() == 1) { Object firstElement = selection.getFirstElement(); @@ -163,7 +163,7 @@ public class ImportTraceabilityPage extends WizardDataTransferPage { } public String[] getTraceUnitHandlerIds() { - List<String> selectedIds = new ArrayList<String>(); + List<String> selectedIds = new ArrayList<>(); for (Button button : traceUnitHandlers.keySet()) { Boolean value = traceUnitHandlers.get(button); if (value != null && value == true) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java index 7f01b262486..6bdcc1f5121 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ImportTraceabilityWizard.java @@ -41,7 +41,7 @@ public class ImportTraceabilityWizard extends Wizard implements IImportWizard { try { IOseeBranch branch = mainPage.getSelectedBranch(); File file = mainPage.getImportFile(); - Collection<TraceHandler> handlers = new LinkedList<TraceHandler>(); + Collection<TraceHandler> handlers = new LinkedList<>(); for (String handlerId : mainPage.getTraceUnitHandlerIds()) { handlers.add(TraceUnitExtensionManager.getInstance().getTraceUnitHandlerById(handlerId)); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java index 6fd0fc057fa..be4f6c64a77 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/RequirementTraceabilityData.java @@ -48,8 +48,8 @@ public class RequirementTraceabilityData { private HashCollection<Artifact, String> requirementsToCodeUnits; private final HashCollection<String, Artifact> requirementNameToTestProcedures = new HashCollection<String, Artifact>(); - private final Set<String> codeUnits = new TreeSet<String>(); - private final Map<String, Artifact> testProcedures = new HashMap<String, Artifact>(); + private final Set<String> codeUnits = new TreeSet<>(); + private final Map<String, Artifact> testProcedures = new HashMap<>(); private File testProcedureFilter; public RequirementTraceabilityData(IOseeBranch testProcedureBranch, TraceabilityProviderOperation traceabilityProvider) { @@ -93,7 +93,7 @@ public class RequirementTraceabilityData { private void getTestProcedureTraceability(IOseeBranch testProcedureBranch) throws OseeCoreException { // Map Software Requirements from TestProcedure IOseeBranch to Requirements IOseeBranch - Map<String, Artifact> testProcedureBranchReqsToReqsBranchMap = new HashMap<String, Artifact>(); + Map<String, Artifact> testProcedureBranchReqsToReqsBranchMap = new HashMap<>(); for (Artifact tpRequirement : ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, testProcedureBranch)) { testProcedureBranchReqsToReqsBranchMap.put(tpRequirement.getName(), tpRequirement); @@ -104,7 +104,7 @@ public class RequirementTraceabilityData { Artifact requirement = entry.getValue(); Set<Artifact> foundProcedures = new HashSet<Artifact>(requirement.getRelatedArtifacts(CoreRelationTypes.Validation__Validator)); - Set<Artifact> toAdd = new HashSet<Artifact>(); + Set<Artifact> toAdd = new HashSet<>(); if (testProceduresFilter.isEmpty() != true) { for (Artifact artifact : foundProcedures) { if (testProceduresFilter.contains(artifact.getName())) { @@ -189,7 +189,7 @@ public class RequirementTraceabilityData { } private Set<String> getAllowedTestProcedures() { - Set<String> toReturn = new HashSet<String>(); + Set<String> toReturn = new HashSet<>(); File filter = getTestProcedureFilterFile(); if (filter != null && filter.exists() && filter.canRead()) { BufferedReader reader = null; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java index abb9d5e9682..c7178de5c13 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/ScriptTraceabilityOperation.java @@ -67,11 +67,11 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { private final Collection<TraceHandler> traceHandlers; private final File file; private final RequirementData requirementData; - private final ArrayList<String> noTraceabilityFiles = new ArrayList<String>(200); - private final CountingMap<Artifact> reqsTraceCounts = new CountingMap<Artifact>(); - private final HashCollection<Artifact, String> requirementToCodeUnitsMap = new HashCollection<Artifact, String>( + private final ArrayList<String> noTraceabilityFiles = new ArrayList<>(200); + private final CountingMap<Artifact> reqsTraceCounts = new CountingMap<>(); + private final HashCollection<Artifact, String> requirementToCodeUnitsMap = new HashCollection<>( false, LinkedHashSet.class); - private final HashSet<String> codeUnits = new HashSet<String>(); + private final HashSet<String> codeUnits = new HashSet<>(); private final CharBackedInputStream charBak; private final ISheetWriter excelWriter; private int pathPrefixLength; @@ -141,7 +141,7 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { for (File sourceFile : Lib.recursivelyListFiles(directory, filePattern)) { CharBuffer buffer = Lib.fileToCharBuffer(sourceFile); - Collection<TraceMark> tracemarks = new LinkedList<TraceMark>(); + Collection<TraceMark> tracemarks = new LinkedList<>(); for (TraceHandler handler : traceHandlers) { Collection<TraceMark> marks = handler.getParser().getTraceMarks(buffer); tracemarks.addAll(marks); @@ -189,7 +189,7 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { String secondary = structuredRequirementMatcher.group(2); if (Strings.isValid(primary) != false) { - toReturn = new Pair<String, String>(primary, secondary); + toReturn = new Pair<>(primary, secondary); } } return toReturn; @@ -325,7 +325,7 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { @Override public Collection<Artifact> getTestUnitArtifacts(Artifact requirement) { - Collection<Artifact> toReturn = new HashSet<Artifact>(); + Collection<Artifact> toReturn = new HashSet<>(); Collection<String> scriptNames = requirementToCodeUnitsMap.getValues(requirement); if (scriptNames != null) { for (String script : scriptNames) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceUnitExtensionManager.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceUnitExtensionManager.java index 43ef040e5ac..05c889a1192 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceUnitExtensionManager.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceUnitExtensionManager.java @@ -41,7 +41,7 @@ public class TraceUnitExtensionManager { private static TraceUnitExtensionManager instance = null; private TraceUnitExtensionManager() { - contributions = new HashMap<String, TraceHandler>(); + contributions = new HashMap<>(); } public static TraceUnitExtensionManager getInstance() { @@ -95,7 +95,7 @@ public class TraceUnitExtensionManager { } public List<String> getAllTraceHandlerNames() throws OseeCoreException { - List<String> handlerNames = new LinkedList<String>(); + List<String> handlerNames = new LinkedList<>(); for (TraceHandler handler : getAllTraceHandlers()) { handlerNames.add(handler.getName()); } @@ -104,7 +104,7 @@ public class TraceUnitExtensionManager { public Collection<ITraceParser> getAllTraceParsers() throws OseeCoreException { checkObjectsLoaded(); - Set<ITraceParser> parsers = new HashSet<ITraceParser>(); + Set<ITraceParser> parsers = new HashSet<>(); for (TraceHandler traceHandler : contributions.values()) { ITraceParser parser = traceHandler.getParser(); if (parser != null) { @@ -116,7 +116,7 @@ public class TraceUnitExtensionManager { public Collection<ITraceUnitResourceLocator> getAllTraceUnitLocators() throws OseeCoreException { checkObjectsLoaded(); - Set<ITraceUnitResourceLocator> locators = new HashSet<ITraceUnitResourceLocator>(); + Set<ITraceUnitResourceLocator> locators = new HashSet<>(); for (TraceHandler traceHandler : contributions.values()) { ITraceUnitResourceLocator locator = traceHandler.getLocator(); if (locator != null) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityExtractor.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityExtractor.java index e2d1b18c3fb..4345b500d2a 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityExtractor.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/TraceabilityExtractor.java @@ -69,7 +69,7 @@ public class TraceabilityExtractor { } private List<String> getTraceMarks(CharBuffer buffer, Matcher matcher) { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); matcher.reset(buffer); while (matcher.find() != false) { String mark = matcher.group(1); @@ -131,7 +131,7 @@ public class TraceabilityExtractor { String primary = structuredRequirementMatcher.group(1); String secondary = structuredRequirementMatcher.group(2); if (Strings.isValid(primary) != false) { - toReturn = new Pair<String, String>(primary, secondary); + toReturn = new Pair<>(primary, secondary); } } return toReturn; diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/action/FindTraceUnitActionDelegate.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/action/FindTraceUnitActionDelegate.java index 59a39ba1005..15f9c58b3e7 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/action/FindTraceUnitActionDelegate.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/action/FindTraceUnitActionDelegate.java @@ -65,7 +65,7 @@ public class FindTraceUnitActionDelegate implements IWorkbenchWindowActionDelega selectedItems = currentSelection; } if (selectedItems != null && !selectedItems.isEmpty()) { - List<IResource> toReturn = new ArrayList<IResource>(); + List<IResource> toReturn = new ArrayList<>(); for (IResource resource : selectedItems) { if (resource instanceof IFile) { toReturn.add(resource); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/RemoveTraceMarksFromTraceUnits.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/RemoveTraceMarksFromTraceUnits.java index 925ab5bdc85..8788413a321 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/RemoveTraceMarksFromTraceUnits.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/RemoveTraceMarksFromTraceUnits.java @@ -94,7 +94,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { } private TraceHandler getCheckedTraceHandler(VariableMap variableMap) throws OseeArgumentException { - List<TraceHandler> toReturn = new ArrayList<TraceHandler>(); + List<TraceHandler> toReturn = new ArrayList<>(); for (TraceHandler handler : getTraceHandlers()) { if (variableMap.getBoolean(handler.getName())) { toReturn.add(handler); @@ -189,7 +189,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { } private List<TraceHandler> getTraceHandlers() { - List<TraceHandler> handlers = new ArrayList<TraceHandler>(); + List<TraceHandler> handlers = new ArrayList<>(); try { for (TraceHandler handler : TraceUnitExtensionManager.getInstance().getAllTraceHandlers()) { if (handler.getParser().isTraceRemovalAllowed()) { @@ -251,7 +251,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { public void addModifiedItem(String name, CharBuffer original, CharBuffer modified) { if (modifiedRows == null) { - modifiedRows = new ArrayList<IResultsXViewerRow>(); + modifiedRows = new ArrayList<>(); } String delta = getDelta(original, modified); String[] entries = delta.split("(\\n|;)"); @@ -293,7 +293,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { public void addNoChangeItem(String... name) { if (noChangeRows == null) { - noChangeRows = new ArrayList<IResultsXViewerRow>(); + noChangeRows = new ArrayList<>(); } noChangeRows.add(new ResultsXViewerRow(name)); } @@ -307,7 +307,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { } private List<XViewerColumn> createColumnHelper(String... headers) { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> columns = new ArrayList<>(); for (String name : headers) { columns.add(new XViewerColumn(name, name, 80, SWT.LEFT, true, SortDataType.String, false, "")); } @@ -327,7 +327,7 @@ public class RemoveTraceMarksFromTraceUnits extends AbstractBlam { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> resultsTabs = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> resultsTabs = new ArrayList<>(); if (modifiedRows != null && !modifiedRows.isEmpty()) { resultsTabs.add(new ResultsEditorTableTab("Modified Trace Units", getModifiedHeaders(), modifiedRows)); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/TraceReportBlam.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/TraceReportBlam.java index 74e6884d0dc..9dbc52fbd6f 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/TraceReportBlam.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/blam/TraceReportBlam.java @@ -69,7 +69,7 @@ public class TraceReportBlam extends AbstractBlam { private final List<IResultsEditorTab> resultsTabs; public TraceReportBlam() { - this.resultsTabs = new ArrayList<IResultsEditorTab>(); + this.resultsTabs = new ArrayList<>(); } @Override @@ -132,7 +132,7 @@ public class TraceReportBlam extends AbstractBlam { // } private List<TraceTypeEnum> getCheckedTraceItems(VariableMap variableMap) throws OseeArgumentException { - List<TraceTypeEnum> toReturn = new ArrayList<TraceTypeEnum>(); + List<TraceTypeEnum> toReturn = new ArrayList<>(); for (TraceTypeEnum traceType : TraceTypeEnum.values()) { if (variableMap.getBoolean(traceType.asLabel())) { toReturn.add(traceType); @@ -161,8 +161,8 @@ public class TraceReportBlam extends AbstractBlam { } ISheetWriter writer = null; CharBackedInputStream excelInputStream = null; - Map<String, AbstractArtifactRelationReport> reports = new LinkedHashMap<String, AbstractArtifactRelationReport>(); - List<BaseTraceDataCache> traceCache = new ArrayList<BaseTraceDataCache>(); + Map<String, AbstractArtifactRelationReport> reports = new LinkedHashMap<>(); + List<BaseTraceDataCache> traceCache = new ArrayList<>(); RequirementData reqData = new RequirementData(branch); CodeUnitData codeUnit = null; TestUnitData testUnit = null; @@ -304,7 +304,7 @@ public class TraceReportBlam extends AbstractBlam { } private void openReport(final List<IResultsEditorTab> resultsTabs) { - final List<IResultsEditorTab> results = new ArrayList<IResultsEditorTab>(resultsTabs); + final List<IResultsEditorTab> results = new ArrayList<>(resultsTabs); if (!results.isEmpty()) { IExceptionableRunnable runnable = new IExceptionableRunnable() { @@ -487,14 +487,14 @@ public class TraceReportBlam extends AbstractBlam { @Override public void addRow(Object data, String... row) { if (rows == null) { - rows = new ArrayList<IResultsXViewerRow>(); + rows = new ArrayList<>(); } rows.add(new ResultsXViewerRow(row, data)); } @Override public void addTableHeader(String... header) { - this.columns = new ArrayList<XViewerColumn>(); + this.columns = new ArrayList<>(); for (String name : header) { columns.add(new XViewerColumn(name, name, 80, SWT.LEFT, true, SortDataType.String, false, "")); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java index a5bd7c31744..fd24f2d2747 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/CodeUnitData.java @@ -29,7 +29,7 @@ public class CodeUnitData extends BaseTraceDataCache { public CodeUnitData(IOseeBranch branch) { super("Code Unit Data", branch); - this.codeUnitMap = new HashMap<String, Artifact>(); + this.codeUnitMap = new HashMap<>(); } @Override diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java index 19ccf68682e..72edb544b4e 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/RequirementData.java @@ -32,8 +32,8 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; public class RequirementData extends BaseTraceDataCache { private static final TraceabilityExtractor traceExtractor = TraceabilityExtractor.getInstance(); - private final List<Artifact> directRequirements = new ArrayList<Artifact>(); - private final HashMap<String, Artifact> allRequirementsMap = new HashMap<String, Artifact>(); + private final List<Artifact> directRequirements = new ArrayList<>(); + private final HashMap<String, Artifact> allRequirementsMap = new HashMap<>(); private final TraceabilityExtractor extractor = TraceabilityExtractor.getInstance(); private final Collection<? extends IArtifactType> types; private final boolean withInheritance; @@ -59,7 +59,7 @@ public class RequirementData extends BaseTraceDataCache { @Override protected void doBulkLoad(IProgressMonitor monitor) throws Exception { - List<Artifact> allSwRequirements = new ArrayList<Artifact>(); + List<Artifact> allSwRequirements = new ArrayList<>(); for (IArtifactType type : types) { if (withInheritance) { allSwRequirements.addAll(ArtifactQuery.getArtifactListFromTypeWithInheritence(type, getBranch(), diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java index f07415914a5..a8c5702cb74 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TestUnitData.java @@ -39,15 +39,15 @@ public class TestUnitData extends BaseTraceDataCache { public TestUnitData(IOseeBranch branch) { super("Test Unit Data", branch); - this.testCaseMap = new HashMap<String, Artifact>(); - this.testProcedureMap = new HashMap<String, Artifact>(); - this.testSupportMap = new HashMap<String, Artifact>(); + this.testCaseMap = new HashMap<>(); + this.testProcedureMap = new HashMap<>(); + this.testSupportMap = new HashMap<>(); - this.testCases = new ArrayList<Artifact>(); - this.testProcedures = new ArrayList<Artifact>(); - this.testSupportItems = new ArrayList<Artifact>(); + this.testCases = new ArrayList<>(); + this.testProcedures = new ArrayList<>(); + this.testSupportItems = new ArrayList<>(); - this.allTestUnits = new TreeSet<Artifact>(); + this.allTestUnits = new TreeSet<>(); } @Override diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TraceUnit.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TraceUnit.java index e40c89d344c..20a7f70eeb2 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TraceUnit.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/data/TraceUnit.java @@ -29,7 +29,7 @@ public class TraceUnit { public TraceUnit(IArtifactType traceUnitType, String name) { this.name = name; this.traceUnitType = traceUnitType; - this.traceMarks = new HashSet<TraceMark>(); + this.traceMarks = new HashSet<>(); } public URI getUriPath() { @@ -63,7 +63,7 @@ public class TraceUnit { } public Set<String> getTraceMarkTypes() { - Set<String> toReturn = new HashSet<String>(); + Set<String> toReturn = new HashSet<>(); for (TraceMark traceMark : traceMarks) { toReturn.add(traceMark.getTraceType()); } @@ -71,7 +71,7 @@ public class TraceUnit { } public Collection<TraceMark> getTraceMarksByType(String type) { - Set<TraceMark> toReturn = new HashSet<TraceMark>(); + Set<TraceMark> toReturn = new HashSet<>(); for (TraceMark traceMark : traceMarks) { if (traceMark.getTraceType().equalsIgnoreCase(type)) { toReturn.add(traceMark); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityContentProvider.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityContentProvider.java index b4d210b067f..50c4f33adec 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityContentProvider.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityContentProvider.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.ui.skynet.results.table.ResultsXViewerRow; public class TraceabilityContentProvider implements ITreeContentProvider { - protected Collection<IResultsXViewerRow> rootSet = new HashSet<IResultsXViewerRow>(); + protected Collection<IResultsXViewerRow> rootSet = new HashSet<>(); private static Object[] EMPTY_ARRAY = new Object[0]; public TraceabilityContentProvider() { @@ -49,7 +49,7 @@ public class TraceabilityContentProvider implements ITreeContentProvider { Object data = row.getData(); if (data instanceof Artifact) { if (((Artifact) data).getArtifactType().inheritsFrom(CoreArtifactTypes.AbstractSoftwareRequirement)) { - List<Object> children = new LinkedList<Object>(); + List<Object> children = new LinkedList<>(); try { for (Artifact art : ((Artifact) data).getRelatedArtifacts(CoreRelationTypes.Verification__Verifier)) { children.add(new ResultsXViewerRow(new String[] {art.getName(), "Verifies"}, art)); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityResultsEditor.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityResultsEditor.java index 26718ef2b2f..4ad33b34444 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityResultsEditor.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/editor/TraceabilityResultsEditor.java @@ -45,7 +45,7 @@ public class TraceabilityResultsEditor extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { - List<IResultsXViewerRow> artRows = new LinkedList<IResultsXViewerRow>(); + List<IResultsXViewerRow> artRows = new LinkedList<>(); for (Artifact req : requirementArtifacts) { if (req.isOfType(CoreArtifactTypes.AbstractSoftwareRequirement)) { artRows.add(new ResultsXViewerRow(new String[] {req.getName(), ""}, req)); @@ -56,7 +56,7 @@ public class TraceabilityResultsEditor extends AbstractOperation { "Requirement Artifact"), new XViewerColumn("Relation", "Relation", 75, SWT.LEFT, true, SortDataType.String, false, "Relation Type")); - final List<IResultsEditorTab> toReturn = new LinkedList<IResultsEditorTab>(); + final List<IResultsEditorTab> toReturn = new LinkedList<>(); IResultsEditorLabelProvider provider = new IResultsEditorLabelProvider() { @Override diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java index 49fc0d4d87d..84b6ac3678d 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/importer/ImportTraceUnitPage.java @@ -107,8 +107,8 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { super(PAGE_NAME); setTitle(PAGE_TITLE); setDescription(PAGE_DESCRIPTION); - this.traceUnitHandlers = new HashMap<Button, Boolean>(); - this.optionButtons = new HashMap<String, Button>(); + this.traceUnitHandlers = new HashMap<>(); + this.optionButtons = new HashMap<>(); this.isFolderRecursionAllowed = new MutableBoolean(false); this.isArtifactPersistanceAllowed = new MutableBoolean(false); @@ -116,7 +116,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { this.isAddGuidToSourceFileAllowed = new MutableBoolean(true); if (selection != null && selection.size() >= 1) { - currentResourceSelection = new LinkedList<IResource>(); + currentResourceSelection = new LinkedList<>(); Iterator<?> it = selection.iterator(); while (it.hasNext()) { Object element = it.next(); @@ -342,7 +342,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { public Iterable<URI> getSourceURI() { List<URI> toReturn = null; if (isWidgetAccessible(directoryFileSelector)) { - toReturn = new LinkedList<URI>(); + toReturn = new LinkedList<>(); for (File file : directoryFileSelector.getSelection()) { toReturn.add(file.toURI()); } @@ -371,7 +371,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { } public String[] getTraceUnitHandlerIds() { - List<String> selectedIds = new ArrayList<String>(); + List<String> selectedIds = new ArrayList<>(); for (Button button : traceUnitHandlers.keySet()) { Boolean value = traceUnitHandlers.get(button); if (value != null && value == true) { @@ -422,7 +422,7 @@ public class ImportTraceUnitPage extends WizardDataTransferPage { String[] traceHandlers = settings.getArray(SELECTED_TRACE_HANDLERS_KEY); if (traceHandlers != null && traceHandlers.length > 0) { - Set<String> traceIds = new HashSet<String>(Arrays.asList(traceHandlers)); + Set<String> traceIds = new HashSet<>(Arrays.asList(traceHandlers)); for (Button button : traceUnitHandlers.keySet()) { Object data = button.getData(); if (data instanceof String) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java index 51210c1e5fe..3837d74940d 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/FindTraceUnitFromResource.java @@ -98,7 +98,7 @@ public final class FindTraceUnitFromResource { public static void search(Branch branch, IResource... resources) { HashCollection<IArtifactType, ResourceIdentifier> typeAndIds = toIdentifiers(resources); if (!typeAndIds.isEmpty()) { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); for (IArtifactType artifactType : typeAndIds.keySet()) { Collection<ResourceIdentifier> items = typeAndIds.getValues(artifactType); if (items != null) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java index 78d5230da98..c63889b1010 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ImportTraceUnitsOperation.java @@ -43,7 +43,7 @@ public class ImportTraceUnitsOperation extends AbstractOperation { if (traceHandlerIds == null) { traceTypeIds = new String[0]; } else { - Set<String> traceSet = new HashSet<String>(Arrays.asList(traceHandlerIds)); + Set<String> traceSet = new HashSet<>(Arrays.asList(traceHandlerIds)); traceTypeIds = traceSet.toArray(new String[traceSet.size()]); } } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java index fbd4878023f..b1fdb2b230e 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/ResourceToTraceUnit.java @@ -44,7 +44,7 @@ public class ResourceToTraceUnit { public ResourceToTraceUnit(final Iterable<URI> sources, final boolean isRecursionAllowed, final boolean isFileWithMultiplePaths) { super(); - this.traceUnitHandlers = new HashCollection<ITraceUnitResourceLocator, ITraceParser>(); + this.traceUnitHandlers = new HashCollection<>(); this.traceProcessors = Collections.synchronizedSet(new HashSet<ITraceUnitProcessor>()); this.resourceFinder = new UriResourceContentFinder(sources, isRecursionAllowed, isFileWithMultiplePaths); } @@ -80,7 +80,7 @@ public class ResourceToTraceUnit { } public void execute(IProgressMonitor monitor) throws OseeCoreException { - List<TraceUnitCollector> collectors = new ArrayList<TraceUnitCollector>(); + List<TraceUnitCollector> collectors = new ArrayList<>(); try { for (ITraceUnitResourceLocator locator : traceUnitHandlers.keySet()) { Collection<ITraceParser> parsers = traceUnitHandlers.getValues(locator); @@ -181,7 +181,7 @@ public class ResourceToTraceUnit { public TraceUnitCollector(ITraceUnitResourceLocator traceUnitLocator, ITraceParser traceParser) { this.traceParser = traceParser; this.traceUnitLocator = traceUnitLocator; - this.traceUnitToTraceMarks = new HashMap<IArtifactType, Map<String, TraceUnit>>(); + this.traceUnitToTraceMarks = new HashMap<>(); } @Override @@ -192,7 +192,7 @@ public class ResourceToTraceUnit { if (traceParser.addIfEmpty() || Conditions.hasValues(traceMarks)) { Map<String, TraceUnit> traceUnits = traceUnitToTraceMarks.get(traceUnitType); if (traceUnits == null) { - traceUnits = new HashMap<String, TraceUnit>(); + traceUnits = new HashMap<>(); traceUnitToTraceMarks.put(traceUnitType, traceUnits); } TraceUnit unit = traceUnits.get(name); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java index 3983381d231..34f5ca190f1 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceResourceDropOperation.java @@ -80,7 +80,7 @@ public class TraceResourceDropOperation extends AbstractOperation { } HierarchyHandler handler = new HierarchyHandler(transaction); - Map<Artifact, String> nameUpdateRequired = new TreeMap<Artifact, String>(); + Map<Artifact, String> nameUpdateRequired = new TreeMap<>(); for (URI resource : resources) { File file = new File(resource); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java index 99b7193eef7..7e0b2389719 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/operations/TraceUnitToArtifactProcessor.java @@ -80,9 +80,9 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { public TraceUnitToArtifactProcessor(IOseeBranch importIntoBranch, boolean addGuidToSourceFile) { this.importIntoBranch = importIntoBranch; - this.reportTraceNotFound = new HashCollection<TraceUnit, TraceMark>(false, HashSet.class); - this.unknownRelationError = new HashCollection<String, String>(false, HashSet.class); - this.unRelatedUnits = new HashSet<String>(); + this.reportTraceNotFound = new HashCollection<>(false, HashSet.class); + this.unknownRelationError = new HashCollection<>(false, HashSet.class); + this.unRelatedUnits = new HashSet<>(); this.addGuidToSourceFile = addGuidToSourceFile; } @@ -322,7 +322,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { } private List<XViewerColumn> createColumns(String... columnNames) { - List<XViewerColumn> columns = new ArrayList<XViewerColumn>(); + List<XViewerColumn> columns = new ArrayList<>(); for (String name : columnNames) { columns.add(new XViewerColumn(name, name, 80, SWT.LEFT, true, SortDataType.String, false, "")); } @@ -332,7 +332,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { private void addUnRelatedTraceUnit(List<IResultsEditorTab> toReturn) { if (!unRelatedUnits.isEmpty()) { List<XViewerColumn> columns = createColumns("Trace Unit Name"); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (String artifactName : unRelatedUnits) { rows.add(new ResultsXViewerRow(new String[] {artifactName})); } @@ -345,7 +345,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { List<XViewerColumn> columns = createColumns("Trace Unit Name", "Trace Unit Type", "Trace Mark Type", "Trace Mark"); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (TraceUnit unit : reportTraceNotFound.keySet()) { Collection<TraceMark> traceMarks = reportTraceNotFound.getValues(unit); for (TraceMark traceMark : traceMarks) { @@ -363,7 +363,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { private void addRelationTypeNotFoundTab(List<IResultsEditorTab> toReturn) { if (!unknownRelationError.isEmpty()) { List<XViewerColumn> columns = createColumns("Artifact Type", "Trace Mark Type"); - List<IResultsXViewerRow> rows = new ArrayList<IResultsXViewerRow>(); + List<IResultsXViewerRow> rows = new ArrayList<>(); for (String artifactType : unknownRelationError.keySet()) { Collection<String> traceTypes = unknownRelationError.getValues(artifactType); for (String traceType : traceTypes) { @@ -376,7 +376,7 @@ public class TraceUnitToArtifactProcessor implements ITraceUnitProcessor { @Override public List<IResultsEditorTab> getResultsEditorTabs() { - List<IResultsEditorTab> toReturn = new ArrayList<IResultsEditorTab>(); + List<IResultsEditorTab> toReturn = new ArrayList<>(); addTraceNotFoundTab(toReturn); addUnRelatedTraceUnit(toReturn); addRelationTypeNotFoundTab(toReturn); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractArtifactRelationReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractArtifactRelationReport.java index d7586c400ef..0356acc89f3 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractArtifactRelationReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractArtifactRelationReport.java @@ -28,8 +28,8 @@ public abstract class AbstractArtifactRelationReport extends AbstractReport { public AbstractArtifactRelationReport() { super(); - this.artifactsToCheck = new HashSet<Artifact>(); - this.relationsToCheck = new ArrayList<IRelationTypeSide>(); + this.artifactsToCheck = new HashSet<>(); + this.relationsToCheck = new ArrayList<>(); } public void setArtifacts(Collection<Artifact> artifacts) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractReport.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractReport.java index 49ac6b2d7df..88d73ba6791 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractReport.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/AbstractReport.java @@ -24,7 +24,7 @@ public abstract class AbstractReport { private final Set<IReportDataCollector> dataCollectors; public AbstractReport() { - this.dataCollectors = new HashSet<IReportDataCollector>(); + this.dataCollectors = new HashSet<>(); } public void addReportDataCollector(IReportDataCollector collector) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactToRelatedArtifact.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactToRelatedArtifact.java index 79ebe897660..47c919a73c1 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactToRelatedArtifact.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactToRelatedArtifact.java @@ -30,7 +30,7 @@ public class ArtifactToRelatedArtifact extends AbstractArtifactRelationReport { } public String[] getHeader() { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); toReturn.add("Name"); toReturn.add("Related By"); toReturn.add("Requirement"); @@ -38,11 +38,11 @@ public class ArtifactToRelatedArtifact extends AbstractArtifactRelationReport { } public List<String[]> getRelatedRows(IRelationTypeSide[] relations, Artifact artifact) throws OseeCoreException { - List<String[]> toReturn = new ArrayList<String[]>(); + List<String[]> toReturn = new ArrayList<>(); int maxSize = 0; - List<List<String>> items = new ArrayList<List<String>>(); + List<List<String>> items = new ArrayList<>(); for (IRelationTypeSide relationEnum : relations) { - List<String> entries = new ArrayList<String>(); + List<String> entries = new ArrayList<>(); for (Artifact relArtifact : artifact.getRelatedArtifacts(relationEnum)) { entries.add(relArtifact.getName()); } diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactTraceCount.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactTraceCount.java index 575c1ec1d53..aff375564ef 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactTraceCount.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/ArtifactTraceCount.java @@ -30,7 +30,7 @@ public class ArtifactTraceCount extends AbstractArtifactRelationReport { } public String[] getHeader() { - List<String> header = new ArrayList<String>(); + List<String> header = new ArrayList<>(); header.add("Name"); header.add("Type"); for (IRelationTypeSide relation : getRelationsToCheck()) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java index ef4fe134aa0..b3f4cb89f38 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/PublishStdStpTraceability.java @@ -89,7 +89,7 @@ public class PublishStdStpTraceability extends AbstractBlam { builder.append(searchInheritedTypes); builder.append("<XWidget xwidgetType=\"XLabel\" displayName=\"=== For traceability stored in test scripts, select the following ===\" />"); - availableTraceHandlers = new LinkedList<String>(); + availableTraceHandlers = new LinkedList<>(); builder.append("<XWidget xwidgetType=\"XLabel\" displayName=\"Select appropriate script parser:\" />"); Collection<String> traceHandlers = TraceUnitExtensionManager.getInstance().getAllTraceHandlerNames(); for (String handler : traceHandlers) { @@ -103,7 +103,7 @@ public class PublishStdStpTraceability extends AbstractBlam { } private List<TraceabilityStyle> getStyles(VariableMap variableMap) throws OseeArgumentException { - List<TraceabilityStyle> styles = new ArrayList<TraceabilityStyle>(); + List<TraceabilityStyle> styles = new ArrayList<>(); for (TraceabilityStyle style : TraceabilityStyle.values()) { boolean isSelected = variableMap.getBoolean(style.asLabel()); if (isSelected) { @@ -122,7 +122,7 @@ public class PublishStdStpTraceability extends AbstractBlam { File scriptDir = new File(variableMap.getString("Script Root Directory")); List<TraceabilityStyle> selectedReports = getStyles(variableMap); - Collection<TraceHandler> traceHandlers = new LinkedList<TraceHandler>(); + Collection<TraceHandler> traceHandlers = new LinkedList<>(); for (String handler : availableTraceHandlers) { if (variableMap.getBoolean(handler)) { TraceHandler traceHandler = TraceUnitExtensionManager.getInstance().getTraceHandlerByName(handler); @@ -151,7 +151,7 @@ public class PublishStdStpTraceability extends AbstractBlam { } else if (status.getSeverity() == IStatus.OK) { monitor.worked(1); int count = 0; - List<IFile> files = new ArrayList<IFile>(); + List<IFile> files = new ArrayList<>(); for (TraceabilityStyle style : selectedReports) { monitor.subTask(String.format("Creating table: [%s] [%s of %s]", style.asLabel(), ++count, selectedReports.size())); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/RequirementStatus.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/RequirementStatus.java index bc95f1aa791..31ab2bb0aa3 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/RequirementStatus.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/RequirementStatus.java @@ -29,8 +29,8 @@ public class RequirementStatus implements Comparable<RequirementStatus> { this.legacyId = legacyId; this.swEnhancement = swEnhancement; this.partitionStatuses = new StringBuilder(); - this.percents = new LinkedList<Integer>(); - this.testPocs = new HashSet<IAtsUser>(); + this.percents = new LinkedList<>(); + this.testPocs = new HashSet<>(); } public void addPartitionStatus(int percentComplete, String partition, String resolution) { diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdCsciToTestTable.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdCsciToTestTable.java index fa0860b4183..0b84208aa1f 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdCsciToTestTable.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdCsciToTestTable.java @@ -134,7 +134,7 @@ public class StdCsciToTestTable implements ISimpleTable { String toReturn = ""; Collection<String> codeUnits = source.getRequirementsToCodeUnits().getValues(artifact); if (codeUnits != null) { - List<String> units = new ArrayList<String>(); + List<String> units = new ArrayList<>(); for (String codeUnit : codeUnits) { if (Strings.isValid(codeUnit)) { int index = codeUnit.lastIndexOf(File.separator); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdTestToCsciTable.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdTestToCsciTable.java index 07c99944a63..bfe017ca32b 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdTestToCsciTable.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/traceability/report/StdTestToCsciTable.java @@ -134,7 +134,7 @@ public class StdTestToCsciTable implements ISimpleTable { } for (String partition : new TreeSet<String>(partitionToQualificationMethod.keySet())) { - List<String> units = new ArrayList<String>(partitionToQualificationMethod.getValues(partition)); + List<String> units = new ArrayList<>(partitionToQualificationMethod.getValues(partition)); Collections.sort(units); for (String codeUnit : units) { List<Artifact> artifacts = @@ -145,7 +145,7 @@ public class StdTestToCsciTable implements ISimpleTable { } private HashCollection<Artifact, String> getQualificationMethods(RequirementTraceabilityData source) { - HashCollection<Artifact, String> toReturn = new HashCollection<Artifact, String>(false, LinkedList.class); + HashCollection<Artifact, String> toReturn = new HashCollection<>(false, LinkedList.class); HashCollection<Artifact, String> requirementsToCodeUnits = source.getRequirementsToCodeUnits(); // Combine Test Scripts and Test Procedures @@ -159,9 +159,9 @@ public class StdTestToCsciTable implements ISimpleTable { } private void processRow(ISheetWriter sheetWriter, String partition, String codeUnit, Collection<Artifact> artifacts) throws Exception { - List<String> paragraphTitles = new ArrayList<String>(); - List<String> paragraphNumbers = new ArrayList<String>(); - List<String> artifactTypes = new ArrayList<String>(); + List<String> paragraphTitles = new ArrayList<>(); + List<String> paragraphNumbers = new ArrayList<>(); + List<String> artifactTypes = new ArrayList<>(); for (Artifact artifact : artifacts) { ArtifactOperations operator = new ArtifactOperations(artifact); String name = operator.getName(); diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/utility/UriResourceContentFinder.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/utility/UriResourceContentFinder.java index 02d5ad3f439..61fee405c22 100644 --- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/utility/UriResourceContentFinder.java +++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/utility/UriResourceContentFinder.java @@ -46,7 +46,7 @@ public class UriResourceContentFinder { this.sources = sources; this.isRecursionAllowed = isRecursionAllowed; this.isFileWithMultiplePaths = isFileWithMultiplePaths; - this.locatorMap = new HashCollection<IResourceLocator, IResourceHandler>(); + this.locatorMap = new HashCollection<>(); } public void addLocator(IResourceLocator locator, IResourceHandler... handler) { |