diff options
author | donald.g.dunne | 2018-12-28 22:30:10 +0000 |
---|---|---|
committer | Ryan T. Baldwin | 2018-12-28 22:30:10 +0000 |
commit | 6665ca08c4c92eeeace64e59864daaaeee511650 (patch) | |
tree | 9e54ca5895a1541cf5e2df42edd13cb5bf0cd325 /plugins | |
parent | 883b8ca5e42f55831c23e235f9618161d2311001 (diff) | |
download | org.eclipse.osee-6665ca08c4c92eeeace64e59864daaaeee511650.tar.gz org.eclipse.osee-6665ca08c4c92eeeace64e59864daaaeee511650.tar.xz org.eclipse.osee-6665ca08c4c92eeeace64e59864daaaeee511650.zip |
feature[ats_TW8369]: Perform java code clean-up
Change-Id: Id4a397e783d2bc191c7c5b2c1cd58f0880a0b0be
Diffstat (limited to 'plugins')
387 files changed, 619 insertions, 804 deletions
diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountWebPreferences.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountWebPreferences.java index f01a67d219f..707e9c59dc7 100644 --- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountWebPreferences.java +++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/AccountWebPreferences.java @@ -22,7 +22,7 @@ import org.json.JSONObject; */ public class AccountWebPreferences { - Map<String, Link> linksMap = new HashMap<String, Link>(); + Map<String, Link> linksMap = new HashMap<>(); public AccountWebPreferences() { diff --git a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/Link.java b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/Link.java index abec1f4d635..4e0120cdd1d 100644 --- a/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/Link.java +++ b/plugins/org.eclipse.osee.account.rest.model/src/org/eclipse/osee/account/rest/model/Link.java @@ -21,7 +21,7 @@ public class Link { String url; String id; String team; - List<String> tags = new ArrayList<String>(); + List<String> tags = new ArrayList<>(); public void setId(String id) { this.id = id; diff --git a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java index b4bb84e50c0..4ca01217d10 100644 --- a/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java +++ b/plugins/org.eclipse.osee.activity/src/org/eclipse/osee/activity/internal/ActivityLogImpl.java @@ -219,7 +219,7 @@ public class ActivityLogImpl implements ActivityLog, Runnable { @Override public List<String> getGarbageCollectionStats() { List<GarbageCollectorMXBean> garbageCollectorMXBeans = ManagementFactory.getGarbageCollectorMXBeans(); - List<String> stats = new ArrayList<String>(garbageCollectorMXBeans.size()); + List<String> stats = new ArrayList<>(garbageCollectorMXBeans.size()); for (GarbageCollectorMXBean gcBean : garbageCollectorMXBeans) { stats.add(String.format("%s: %s (count); %s (ms)", gcBean.getName(), gcBean.getCollectionCount(), gcBean.getCollectionTime())); @@ -449,14 +449,14 @@ public class ActivityLogImpl implements ActivityLog, Runnable { if (enabled) { if (!newEntities.isEmpty()) { try { - storage.addEntries(new DrainingIterator<Object[]>(newEntities.values().iterator())); + storage.addEntries(new DrainingIterator<>(newEntities.values().iterator())); } catch (Throwable ex) { logger.error(ex, "Exception while storing updates to the activity log"); } } if (!updatedEntities.isEmpty()) { try { - storage.updateEntries(new DrainingIterator<Object[]>(updatedEntities.values().iterator())); + storage.updateEntries(new DrainingIterator<>(updatedEntities.values().iterator())); } catch (Throwable ex) { logger.error(ex, "Exception while storing updates to the activity log"); } diff --git a/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppResource.java b/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppResource.java index b48f6e93795..387156b0f8d 100644 --- a/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppResource.java +++ b/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppResource.java @@ -46,7 +46,7 @@ public final class OseeAppResource { @GET @Produces(MediaType.APPLICATION_JSON) public Collection<OseeAppTransfer> getOseeAppListJson(@QueryParam("filter") String filterText) { - List<OseeAppTransfer> results = new LinkedList<OseeAppTransfer>(); + List<OseeAppTransfer> results = new LinkedList<>(); BranchId branchId = orcsApi.getQueryFactory().branchQuery().andNameEquals("Common").getResultsAsId().getExactlyOne(); ResultSet<ArtifactReadable> apps = diff --git a/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppletPage.java b/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppletPage.java index 2c331a38438..2c085df6ee1 100644 --- a/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppletPage.java +++ b/plugins/org.eclipse.osee.app/src/org/eclipse/osee/app/OseeAppletPage.java @@ -74,7 +74,7 @@ public class OseeAppletPage { if (listId.equals("baselineBranches") || listId.equals("workingAndBaselineBranches")) { if (!dataListsRule.ruleExists(listId)) { Iterable<IOseeBranch> options = getBranchOptions(query, listId); - dataListsRule.addRule(new IdentifiableLongOptionsRule<IOseeBranch>("", options, listId)); + dataListsRule.addRule(new IdentifiableLongOptionsRule<>("", options, listId)); } } } diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileSprintData.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileSprintData.java index 71927bdf06c..6a1bba78ec0 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileSprintData.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/AgileSprintData.java @@ -33,7 +33,7 @@ public class AgileSprintData { private String pointsAttrTypeName; private Integer plannedPoints = 0; private Integer unPlannedPoints = null; - private List<AgileSprintDateData> dates = new ArrayList<AgileSprintDateData>(); + private List<AgileSprintDateData> dates = new ArrayList<>(); private XResultData results = new XResultData(); public XResultData validate() { diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramBacklog.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramBacklog.java index 30403c30d37..611f9766700 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramBacklog.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramBacklog.java @@ -17,12 +17,14 @@ import java.util.List; */ public interface IAgileProgramBacklog extends IAgileObject { + @Override String getName(); Long getProgramId(); List<Long> getBacklogItemIds(); + @Override Long getId(); } diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramBacklogItem.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramBacklogItem.java index 8c37d2e7898..0264df7fd4f 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramBacklogItem.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramBacklogItem.java @@ -15,10 +15,12 @@ package org.eclipse.osee.ats.api.agile; */ public interface IAgileProgramBacklogItem extends IAgileObject { + @Override String getName(); Long getBacklogId(); + @Override Long getId(); } diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramFeature.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramFeature.java index 856a343c176..f3e338b0374 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramFeature.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileProgramFeature.java @@ -21,8 +21,10 @@ public interface IAgileProgramFeature extends IAgileObject { List<Long> getStoryIds(); + @Override String getName(); + @Override Long getId(); } diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileStory.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileStory.java index 28ade74535c..909307444c3 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileStory.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/IAgileStory.java @@ -19,8 +19,10 @@ public interface IAgileStory extends IAgileObject { List<Long> getTaskIds(); + @Override String getName(); + @Override Long getId(); Long getFeatureId(); diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileItem.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileItem.java index fe32cfdbd58..b31b3554cca 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileItem.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/JaxAgileItem.java @@ -27,7 +27,7 @@ public class JaxAgileItem extends JaxAgileObject { private boolean setSprint = false; private boolean setBacklog = false; private String toState = null; - private List<String> toStateUsers = new ArrayList<String>(); + private List<String> toStateUsers = new ArrayList<>(); private boolean setAssignees = false; private List<String> assigneesAccountIds = new ArrayList<>(); diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/atw/AtwNode.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/atw/AtwNode.java index 8cca7c754e7..a2a489ff88c 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/atw/AtwNode.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/atw/AtwNode.java @@ -24,7 +24,7 @@ public class AtwNode { String name; String image = null; String id; - List<AtwNode> children = new LinkedList<AtwNode>(); + List<AtwNode> children = new LinkedList<>(); boolean expanded = false; public String getName() { diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbAvailableState.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbAvailableState.java index c059f44cadb..0922544df30 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbAvailableState.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbAvailableState.java @@ -21,7 +21,7 @@ public class JaxKbAvailableState { private String name; private int ordinal; private String stateType; - private List<String> toStates = new ArrayList<String>(); + private List<String> toStates = new ArrayList<>(); public String getName() { return name; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbRowIdToTaskId.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbRowIdToTaskId.java index 2fceabab030..56dbad1e599 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbRowIdToTaskId.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbRowIdToTaskId.java @@ -19,7 +19,7 @@ import java.util.Set; public class JaxKbRowIdToTaskId { private String rowId; - private Set<String> taskIds = new HashSet<String>(); + private Set<String> taskIds = new HashSet<>(); public Set<String> getTaskIds() { return taskIds; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbSprint.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbSprint.java index 5b3b8e93df2..8dc81402610 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbSprint.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbSprint.java @@ -21,15 +21,15 @@ import org.eclipse.osee.ats.api.agile.JaxAgileSprint; */ public class JaxKbSprint extends JaxAgileSprint { - List<JaxKbRowIdToTaskId> rowToTaskIds = new LinkedList<JaxKbRowIdToTaskId>(); - Map<String, String> rowIdToName = new HashMap<String, String>(); - Map<String, String> userIdToName = new HashMap<String, String>(); - Map<String, String> userNameToId = new HashMap<String, String>(); + List<JaxKbRowIdToTaskId> rowToTaskIds = new LinkedList<>(); + Map<String, String> rowIdToName = new HashMap<>(); + Map<String, String> userIdToName = new HashMap<>(); + Map<String, String> userNameToId = new HashMap<>(); List<String> teamMembersOrdered = new LinkedList<>(); List<String> otherMembersOrdered = new LinkedList<>(); - List<JaxKbState> statesToTaskIds = new LinkedList<JaxKbState>(); - List<JaxKbAvailableState> availableStates = new LinkedList<JaxKbAvailableState>(); - Map<String, JaxKbTask> tasks = new HashMap<String, JaxKbTask>(); + List<JaxKbState> statesToTaskIds = new LinkedList<>(); + List<JaxKbAvailableState> availableStates = new LinkedList<>(); + Map<String, JaxKbTask> tasks = new HashMap<>(); KanbanRowType rowType; public void addRowIdToTaskId(String rowId, String taskId) { diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbState.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbState.java index 3c223cdbc20..0dcd0902d4a 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbState.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbState.java @@ -19,7 +19,7 @@ import java.util.List; public class JaxKbState { private String name; - private List<String> taskIds = new ArrayList<String>(); + private List<String> taskIds = new ArrayList<>(); public String getName() { return name; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbTask.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbTask.java index d30cefa05ec..537f42d5b84 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbTask.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/kanban/JaxKbTask.java @@ -21,7 +21,7 @@ public class JaxKbTask { private String name; // ngDraggable and Agile web requires guid for tasks, don't change this id private String guid; - private Map<String, String> attributeMap = new HashMap<String, String>(); + private Map<String, String> attributeMap = new HashMap<>(); private String branchGuid; private boolean canEdit; private String artifactType; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/program/UiGridProgram.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/program/UiGridProgram.java index f009ca031c5..31e300b4527 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/program/UiGridProgram.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/agile/program/UiGridProgram.java @@ -21,7 +21,7 @@ import org.eclipse.osee.ats.api.config.JaxAtsObject; */ public class UiGridProgram extends JaxAtsObject { - List<UiGridProgItem> items = new ArrayList<UiGridProgItem>(); + List<UiGridProgItem> items = new ArrayList<>(); public UiGridProgram() { // for jax-rs diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsArtifactImages.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsArtifactImages.java index 756f4bf814b..6577ee26ef2 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsArtifactImages.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/data/AtsArtifactImages.java @@ -20,7 +20,7 @@ import org.eclipse.osee.framework.core.data.IArtifactType; */ public class AtsArtifactImages { - private final static List<ArtifactImage> images = new LinkedList<ArtifactImage>(); + private final static List<ArtifactImage> images = new LinkedList<>(); public static ArtifactImage AGILE_TASK = AtsArtifactImages.construct(AtsArtifactTypes.TeamWorkflow, "workflow.gif", "/ats/agileui/images"); public static ArtifactImage AGILE_SPRINT = diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationCollector.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationCollector.java index fc9cbc7171b..ae43213545a 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationCollector.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/notify/AtsNotificationCollector.java @@ -27,7 +27,7 @@ public class AtsNotificationCollector { private String subject, body; private final List<AtsNotificationEvent> notificationEvents = new ArrayList<>(); private final List<AtsWorkItemNotificationEvent> workItemNotificationEvents = - new ArrayList<AtsWorkItemNotificationEvent>(); + new ArrayList<>(); private boolean includeCancelHyperlink = false; public void addNotificationEvent(AtsNotificationEvent notificationEvent) { diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/DecisionOption.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/DecisionOption.java index 26bda16cd0b..4b11db8412f 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/DecisionOption.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/review/DecisionOption.java @@ -41,7 +41,7 @@ public class DecisionOption { } public DecisionOption(String name, IAtsUser assignee, boolean followup, AtsApi atsApi) { - this(name, (assignee == null ? Collections.emptyList() : Collections.singleton(assignee)), followup, atsApi); + this(name, assignee == null ? Collections.emptyList() : Collections.singleton(assignee), followup, atsApi); } public DecisionOption(String name, Collection<IAtsUser> assignees, boolean followup, AtsApi atsApi) { @@ -49,7 +49,7 @@ public class DecisionOption { this.followupRequired = followup; this.atsApi = atsApi; if (assignees != null) { - this.assignees = new HashSet<IAtsUser>(assignees); + this.assignees = new HashSet<>(assignees); } } diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUsers.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUsers.java index 62fea5dff4e..7043a8b471f 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUsers.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/user/JaxAtsUsers.java @@ -18,7 +18,7 @@ import java.util.List; */ public class JaxAtsUsers { - private List<AtsUser> users = new LinkedList<AtsUser>(); + private List<AtsUser> users = new LinkedList<>(); public JaxAtsUsers() { // for jax-rs diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/StateTypeAdapter.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/StateTypeAdapter.java index 4b8e8c70169..3b90ddc0c54 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/StateTypeAdapter.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workdef/StateTypeAdapter.java @@ -29,10 +29,10 @@ import org.eclipse.osee.framework.jdk.core.util.Collections; public abstract class StateTypeAdapter implements IStateToken { private final StateType StateType; private static CompositeKeyHashMap<Class<?>, String, StateTypeAdapter> classAndNameToPage = - new CompositeKeyHashMap<Class<?>, String, StateTypeAdapter>(); + new CompositeKeyHashMap<>(); private static final Map<StateTypeAdapter, Integer> pageToOrdinal = new HashMap<>(10); private static final Map<Class<?>, List<StateTypeAdapter>> classToPages = - new HashMap<Class<?>, List<StateTypeAdapter>>(); + new HashMap<>(); private static final CountingMap<Class<?>> classToOrdinalCount = new CountingMap<>(20); private String description; private final String pageName; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java index fc82730af97..7bb9749c390 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/NewActionData.java @@ -34,7 +34,7 @@ public class NewActionData { String transactionComment; String needByDateLong; String needByDate; - Map<String, String> attrValues = new HashMap<String, String>(); + Map<String, String> attrValues = new HashMap<>(); String points; boolean unplanned; String sprint; diff --git a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/TransitionResults.java b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/TransitionResults.java index 0a92e27f1c3..20ec24fb0c0 100644 --- a/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/TransitionResults.java +++ b/plugins/org.eclipse.osee.ats.api/src/org/eclipse/osee/ats/api/workflow/transition/TransitionResults.java @@ -29,7 +29,7 @@ public class TransitionResults { private final List<ITransitionResult> results = new ArrayList<>(); private final Map<IAtsWorkItem, List<ITransitionResult>> workItemToResults = - new HashMap<IAtsWorkItem, List<ITransitionResult>>(); + new HashMap<>(); public void addResult(IAtsWorkItem workItem, ITransitionResult result) { List<ITransitionResult> results = workItemToResults.get(workItem); diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd10SetupAndImportReqs.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd10SetupAndImportReqs.java index e79cef392ae..e4b011da5e9 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd10SetupAndImportReqs.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd10SetupAndImportReqs.java @@ -94,8 +94,8 @@ public class Pdd10SetupAndImportReqs implements IPopulateDemoDatabase { demoDbTraceabilityTx(demoDbTraceability, SAW_Bld_1); demoDbTraceability.execute(); - BranchId sawBld2Branch = createNewBaselineBranch(SAW_Bld_1, SAW_Bld_2); - BranchId sawBld3Branch = createNewBaselineBranch(SAW_Bld_2, SAW_Bld_3); + createNewBaselineBranch(SAW_Bld_1, SAW_Bld_2); + createNewBaselineBranch(SAW_Bld_2, SAW_Bld_3); } private static void validateArtifactCache() { diff --git a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd93CreateDemoAgile.java b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd93CreateDemoAgile.java index 974b0bf32ef..ca597e1bbd1 100644 --- a/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd93CreateDemoAgile.java +++ b/plugins/org.eclipse.osee.ats.client.demo/src/org/eclipse/osee/ats/client/demo/populate/Pdd93CreateDemoAgile.java @@ -35,7 +35,6 @@ import org.eclipse.osee.ats.api.agile.JaxAgileProgramFeature; import org.eclipse.osee.ats.api.agile.JaxAgileStory; import org.eclipse.osee.ats.api.agile.JaxNewAgileBacklog; import org.eclipse.osee.ats.api.agile.JaxNewAgileFeatureGroup; -import org.eclipse.osee.ats.api.agile.JaxNewAgileProgramFeature; import org.eclipse.osee.ats.api.agile.JaxNewAgileSprint; import org.eclipse.osee.ats.api.agile.JaxNewAgileTeam; import org.eclipse.osee.ats.api.config.JaxAtsObject; @@ -500,14 +499,6 @@ public class Pdd93CreateDemoAgile { return backlog; } - private JaxNewAgileProgramFeature newProgramFeature(String name) { - JaxNewAgileProgramFeature programFeature = new JaxNewAgileProgramFeature(); - programFeature.setName(name); - programFeature.setProgramBacklogItemId(DemoArtifactToken.SAW_Agile_Team.getId()); - programFeature.setId(Lib.generateArtifactIdAsInt()); - return programFeature; - } - private JaxNewAgileFeatureGroup newFeatureGroup(String name) { JaxNewAgileFeatureGroup group = new JaxNewAgileFeatureGroup(); group.setName(name); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java index 108e2ab4d5a..7742534845f 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/config/AtsBranchConfigurationTest.java @@ -190,14 +190,14 @@ public class AtsBranchConfigurationTest { blk3MainArt.persist(getClass().getSimpleName()); // commit branch - commitBranch(((TeamWorkFlowArtifact) teamWf.getStoreObject())); + commitBranch((TeamWorkFlowArtifact) teamWf.getStoreObject()); // test change report if (DEBUG) { OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Test change report results"); } ChangeData changeData = - AtsBranchManager.getChangeDataFromEarliestTransactionId(((TeamWorkFlowArtifact) teamWf.getStoreObject())); + AtsBranchManager.getChangeDataFromEarliestTransactionId((TeamWorkFlowArtifact) teamWf.getStoreObject()); assertFalse("No changes detected", changeData.isEmpty()); Collection<Artifact> newArts = changeData.getArtifacts(KindType.Artifact, ModificationType.NEW); @@ -292,14 +292,14 @@ public class AtsBranchConfigurationTest { blk3MainArt.persist(getClass().getSimpleName()); // commit branch - commitBranch(((TeamWorkFlowArtifact) teamWf.getStoreObject())); + commitBranch((TeamWorkFlowArtifact) teamWf.getStoreObject()); // test change report if (DEBUG) { OseeLog.log(AtsBranchConfigurationTest.class, Level.INFO, "Test change report results"); } ChangeData changeData = - AtsBranchManager.getChangeDataFromEarliestTransactionId(((TeamWorkFlowArtifact) teamWf.getStoreObject())); + AtsBranchManager.getChangeDataFromEarliestTransactionId((TeamWorkFlowArtifact) teamWf.getStoreObject()); assertTrue("No changes detected", !changeData.isEmpty()); Collection<Artifact> newArts = changeData.getArtifacts(KindType.Artifact, ModificationType.NEW); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd90CreateDemoTasksTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd90CreateDemoTasksTest.java index 95a734af9f6..432b99d1ede 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd90CreateDemoTasksTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/demo/Pdd90CreateDemoTasksTest.java @@ -38,7 +38,7 @@ public class Pdd90CreateDemoTasksTest implements IPopulateDemoDatabaseTest { create.run(); TeamWorkFlowArtifact teamWf = DemoUtil.getSawCodeCommittedWf(); - List<String> taskNames = new LinkedList<String>(); + List<String> taskNames = new LinkedList<>(); taskNames.addAll(DemoUtil.Saw_Code_Committed_Task_Titles); for (IAtsTask task : AtsClientService.get().getTaskService().getTasks(teamWf)) { testTaskContents((TaskArtifact) task, TaskStates.InWork.getName(), TeamState.Implement.getName()); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AbstractImageManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AbstractImageManagerTest.java index c8fc032183e..4eb0556fe9e 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AbstractImageManagerTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AbstractImageManagerTest.java @@ -60,13 +60,13 @@ public abstract class AbstractImageManagerTest { @org.junit.AfterClass public static void testCleanup() throws Exception { List<IHealthStatus> stats = monitorLog.getAllLogs(); - for (IHealthStatus stat : new ArrayList<IHealthStatus>(stats)) { + for (IHealthStatus stat : new ArrayList<>(stats)) { if (stat.getException() != null) { fail("Exception: " + Lib.exceptionToString(stat.getException())); } } StringBuffer sb = new StringBuffer(); - for (IHealthStatus stat : new ArrayList<IHealthStatus>(stats)) { + for (IHealthStatus stat : new ArrayList<>(stats)) { if (stat.getMessage().contains("Unable to load the image for") && !stat.getMessage().contains("nothere")) { sb.append(stat.getMessage() + "\n"); } diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsChangeSetTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsChangeSetTest.java index 7fb6f10dba8..72da2109f21 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsChangeSetTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/AtsChangeSetTest.java @@ -37,7 +37,7 @@ import org.junit.Test; public class AtsChangeSetTest { Artifact folderArt = null; - List<Artifact> genDocArts = new ArrayList<Artifact>(); + List<Artifact> genDocArts = new ArrayList<>(); @Before public void setup() { diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java index 54eb336c15d..7bc5799ebeb 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/util/ImportActionsViaSpreadsheetTest.java @@ -171,12 +171,12 @@ public class ImportActionsViaSpreadsheetTest { Assert.assertTrue("members should be in order", ((IAtsObject) members.toArray()[17]).getDescription().startsWith("Phase 1")); Assert.assertEquals("2", AtsClientService.get().getAttributeResolver().getSoleAttributeValue( - ((IAtsObject) members.toArray()[17]), AtsAttributeTypes.Points, "")); + (IAtsObject) members.toArray()[17], AtsAttributeTypes.Points, "")); Assert.assertTrue("members should be in order", ((IAtsObject) members.toArray()[18]).getDescription().startsWith("Phase 2")); Assert.assertEquals("3", AtsClientService.get().getAttributeResolver().getSoleAttributeValue( - ((IAtsObject) members.toArray()[18]), AtsAttributeTypes.Points, "")); + (IAtsObject) members.toArray()[18], AtsAttributeTypes.Points, "")); } diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/review/DecisionReviewManagerTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/review/DecisionReviewManagerTest.java index af62e8618a2..c2ab37d9b11 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/review/DecisionReviewManagerTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/ats/workflow/review/DecisionReviewManagerTest.java @@ -76,7 +76,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager { Assert.assertNotNull(decRev); Assert.assertFalse( String.format("Decision Review artifact should not be dirty [%s]", - Artifacts.getDirtyReport((AtsClientService.get().getQueryServiceClient().getArtifact(decRev)))), + Artifacts.getDirtyReport(AtsClientService.get().getQueryServiceClient().getArtifact(decRev))), AtsClientService.get().getQueryServiceClient().getArtifact(decRev).isDirty()); Assert.assertEquals(DecisionReviewState.Decision.getName(), decRev.getStateMgr().getCurrentStateName()); Assert.assertEquals(DemoUsers.Joe_Smith.getName(), decRev.getStateMgr().getAssigneesStr()); @@ -107,7 +107,7 @@ public class DecisionReviewManagerTest extends DecisionReviewManager { Assert.assertEquals(reviewTitle, decRev.getName()); Assert.assertFalse( String.format("Decision Review artifact should not be dirty [%s]", - Artifacts.getDirtyReport((AtsClientService.get().getQueryServiceClient().getArtifact(decRev)))), + Artifacts.getDirtyReport(AtsClientService.get().getQueryServiceClient().getArtifact(decRev))), AtsClientService.get().getQueryServiceClient().getArtifact(decRev).isDirty()); Assert.assertEquals(DecisionReviewState.Decision.getName(), decRev.getStateMgr().getCurrentStateName()); Assert.assertEquals("UnAssigned", decRev.getStateMgr().getAssigneesStr()); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/EmailWizardTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/EmailWizardTest.java index 8c0bb4fa2ff..eea20c249a2 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/EmailWizardTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/framework/ui/skynet/dialog/EmailWizardTest.java @@ -26,7 +26,7 @@ public class EmailWizardTest { @Test public void test() { - EmailWizard wizard = new EmailWizard("html", "subject", new ArrayList<EmailGroup>(), new ArrayList<Object>()); + EmailWizard wizard = new EmailWizard("html", "subject", new ArrayList<EmailGroup>(), new ArrayList<>()); WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard); try { dialog.setBlockOnOpen(false); diff --git a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/AtsMockitoTest.java b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/AtsMockitoTest.java index 8f42d33595a..a31835e897c 100644 --- a/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/AtsMockitoTest.java +++ b/plugins/org.eclipse.osee.ats.client.integration.tests/src/org/eclipse/osee/ats/client/integration/tests/util/AtsMockitoTest.java @@ -141,7 +141,7 @@ public class AtsMockitoTest { inializeVersion(ver3, "ver 3.0"); inializeVersion(ver4, "ver 4.0"); - Set<IAtsVersion> vers = new HashSet<IAtsVersion>(); + Set<IAtsVersion> vers = new HashSet<>(); vers.addAll(Arrays.asList(ver1, ver2, ver3, ver4)); when(teamDef.getVersions()).thenReturn(vers); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/CountryColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/CountryColumnTest.java index 63e76f0b47d..9c588fd9461 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/CountryColumnTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/CountryColumnTest.java @@ -53,12 +53,12 @@ public class CountryColumnTest extends CountryColumn { str = CountryColumn.getCountryStr(workItem, atsApi, util); assertEquals(str, ""); - when(util.getCountry(atsApi, workItem)).thenReturn(new Pair<IAtsCountry, Boolean>(country, false)); + when(util.getCountry(atsApi, workItem)).thenReturn(new Pair<>(country, false)); when(country.getName()).thenReturn("Country"); str = CountryColumn.getCountryStr(workItem, atsApi, util); assertEquals(str, "Country"); - when(util.getCountry(atsApi, workItem)).thenReturn(new Pair<IAtsCountry, Boolean>(country, true)); + when(util.getCountry(atsApi, workItem)).thenReturn(new Pair<>(country, true)); str = CountryColumn.getCountryStr(workItem, atsApi, util); assertEquals(str, "Country (I)"); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionActivityColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionActivityColumnTest.java index 9f0cb8b7d60..436593e3d63 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionActivityColumnTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionActivityColumnTest.java @@ -55,13 +55,13 @@ public class InsertionActivityColumnTest { assertEquals(str, ""); when(util.getInsertionActivity(atsApi, workItem)).thenReturn( - new Pair<IAtsInsertionActivity, Boolean>(program, false)); + new Pair<>(program, false)); when(program.getName()).thenReturn("Country"); str = InsertionActivityColumn.getInsertionActivityStr(workItem, atsApi, util); assertEquals(str, "Country"); when(util.getInsertionActivity(atsApi, workItem)).thenReturn( - new Pair<IAtsInsertionActivity, Boolean>(program, true)); + new Pair<>(program, true)); str = InsertionActivityColumn.getInsertionActivityStr(workItem, atsApi, util); assertEquals(str, "Country (I)"); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionColumnTest.java index 15f64d425d4..5f681fae8ce 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionColumnTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/InsertionColumnTest.java @@ -53,12 +53,12 @@ public class InsertionColumnTest { str = InsertionColumn.getInsertionStr(workItem, atsApi, util); assertEquals(str, ""); - when(util.getInsertion(atsApi, workItem)).thenReturn(new Pair<IAtsInsertion, Boolean>(program, false)); + when(util.getInsertion(atsApi, workItem)).thenReturn(new Pair<>(program, false)); when(program.getName()).thenReturn("Country"); str = InsertionColumn.getInsertionStr(workItem, atsApi, util); assertEquals(str, "Country"); - when(util.getInsertion(atsApi, workItem)).thenReturn(new Pair<IAtsInsertion, Boolean>(program, true)); + when(util.getInsertion(atsApi, workItem)).thenReturn(new Pair<>(program, true)); str = InsertionColumn.getInsertionStr(workItem, atsApi, util); assertEquals(str, "Country (I)"); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ParentTopTeamColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ParentTopTeamColumnTest.java index b6309f1bdd6..8f29e8be5d1 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ParentTopTeamColumnTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ParentTopTeamColumnTest.java @@ -60,7 +60,7 @@ public class ParentTopTeamColumnTest { */ @org.junit.Test public void testGetColumnText_fromTeamWf() throws Exception { - Set<IAtsVersion> ver = new HashSet<IAtsVersion>(); + Set<IAtsVersion> ver = new HashSet<>(); ver.addAll(Arrays.asList(ver1)); when(teamDef_top.getVersions()).thenReturn(ver); @@ -74,7 +74,7 @@ public class ParentTopTeamColumnTest { */ @org.junit.Test public void testGetColumnText_fromRelatedReview() throws Exception { - Set<IAtsVersion> ver = new HashSet<IAtsVersion>(); + Set<IAtsVersion> ver = new HashSet<>(); ver.addAll(Arrays.asList(ver1)); when(teamDef_top.getVersions()).thenReturn(ver); when(rev1.getParentTeamWorkflow()).thenReturn(teamWf1); diff --git a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ProgramColumnTest.java b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ProgramColumnTest.java index 88927758fd6..a12c0777eb9 100644 --- a/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ProgramColumnTest.java +++ b/plugins/org.eclipse.osee.ats.core.test/src/org/eclipse/osee/ats/core/column/ProgramColumnTest.java @@ -53,12 +53,12 @@ public class ProgramColumnTest extends ProgramColumn { str = ProgramColumn.getProgramStr(workItem, atsApi, util); assertEquals(str, ""); - when(util.getProgram(atsApi, workItem)).thenReturn(new Pair<IAtsProgram, Boolean>(program, false)); + when(util.getProgram(atsApi, workItem)).thenReturn(new Pair<>(program, false)); when(program.getName()).thenReturn("Country"); str = ProgramColumn.getProgramStr(workItem, atsApi, util); assertEquals(str, "Country"); - when(util.getProgram(atsApi, workItem)).thenReturn(new Pair<IAtsProgram, Boolean>(program, true)); + when(util.getProgram(atsApi, workItem)).thenReturn(new Pair<>(program, true)); str = ProgramColumn.getProgramStr(workItem, atsApi, util); assertEquals(str, "Country (I)"); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java index 64b68e9bcae..9d8b40a07ac 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/AgileItemWriter.java @@ -188,7 +188,7 @@ public class AgileItemWriter { private List<IAtsWorkItem> getWorkItems() { if (workItems == null) { - workItems = new LinkedList<IAtsWorkItem>(); + workItems = new LinkedList<>(); for (long id : newItem.getIds()) { IAtsWorkItem workItem = atsApi.getQueryService().getTeamWf(id); workItems.add(workItem); @@ -198,7 +198,7 @@ public class AgileItemWriter { } private Collection<IAtsUser> getAssignees(List<String> usersAccountIds) { - List<IAtsUser> users = new ArrayList<IAtsUser>(); + List<IAtsUser> users = new ArrayList<>(); for (String userId : usersAccountIds) { users.add(atsApi.getUserService().getUserByAccountId(Long.valueOf(userId))); } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/SprintDataBuilder.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/SprintDataBuilder.java index 89f32f22b40..d333e833334 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/SprintDataBuilder.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/SprintDataBuilder.java @@ -255,7 +255,7 @@ public class SprintDataBuilder { } // due to rounding, last day may be more than pointsPerDay else { - double goalPoints = totalPoints - ((count - 2) * pointsPerDay); + double goalPoints = totalPoints - (count - 2) * pointsPerDay; if (goalPoints < 0) { goalPoints = 0; } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/SprintUtil.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/SprintUtil.java index ef041a11f7d..cdf7b3bdbd4 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/SprintUtil.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/agile/SprintUtil.java @@ -137,7 +137,7 @@ public class SprintUtil { item.setVersion(ver == null ? "" : ver.getName()); Boolean unplanned = atsApi.getAttributeResolver().getSoleAttributeValue(aItem, AtsAttributeTypes.UnPlannedWork, false); - item.setUnPlannedWork((unplanned ? "U" : "")); + item.setUnPlannedWork(unplanned ? "U" : ""); item.setNotes(atsApi.getAttributeResolver().getSoleAttributeValue(aItem, AtsAttributeTypes.SmaNote, "")); item.setCreateDate(CreatedDateColumn.getDateStr(workItem)); item.setCompCancelDate(CompletedCancelledDateColumn.getCompletedCancelledDateStr(workItem)); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ModifyActionableItems.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ModifyActionableItems.java index ab004c933d1..b3f616bcdf7 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ModifyActionableItems.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/ai/ModifyActionableItems.java @@ -45,7 +45,7 @@ public class ModifyActionableItems { private final List<IAtsActionableItem> addAis = new ArrayList<>(); private final List<IAtsActionableItem> removeAis = new ArrayList<>(); private final Map<IAtsTeamDefinition, CreateTeamData> teamDefToTeamDataMap = - new HashMap<IAtsTeamDefinition, CreateTeamData>(); + new HashMap<>(); private final ITeamDefinitionUtility teamDefUtil; public ModifyActionableItems(XResultData results, IAtsTeamWorkflow teamWf, Collection<IAtsActionableItem> currAIsForAllWfs, Collection<IAtsActionableItem> currWorkflowDesiredAIs, Collection<IAtsActionableItem> newAIs, IAtsUser modifiedBy, ITeamDefinitionUtility teamDefUtil) { @@ -93,7 +93,7 @@ public class ModifyActionableItems { createTeamData.getActionableItems().add(ai); } else { CreateTeamData createTeamData = - new CreateTeamData(teamDef, Arrays.asList(ai), new LinkedList<IAtsUser>(teamDef.getLeads()), createdDate, + new CreateTeamData(teamDef, Arrays.asList(ai), new LinkedList<>(teamDef.getLeads()), createdDate, modifiedBy, CreateTeamOption.Duplicate_If_Exists); teamDatas.add(createTeamData); teamDefToTeamDataMap.put(teamDef, createTeamData); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ParentTitleColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ParentTitleColumn.java index c02ebe59c74..6692dba5722 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ParentTitleColumn.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/column/ParentTitleColumn.java @@ -27,7 +27,7 @@ public class ParentTitleColumn extends AbstractServicesColumn { @Override String getText(IAtsObject atsObject) throws Exception { String result = null; - if (atsObject instanceof IAtsWorkItem && (!(atsObject instanceof IAtsTeamWorkflow))) { + if (atsObject instanceof IAtsWorkItem && !(atsObject instanceof IAtsTeamWorkflow)) { IAtsTeamWorkflow parentTeam = ((IAtsWorkItem) atsObject).getParentTeamWorkflow(); if (parentTeam != null) { result = parentTeam.getName(); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java index 58c2ce14b05..865e8eff367 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/config/TeamDefinition.java @@ -287,7 +287,7 @@ public class TeamDefinition extends AtsConfigObject implements IAtsTeamDefinitio public Collection<IAtsVersion> getVersionsFromTeamDefHoldingVersions(VersionReleaseType releaseType, VersionLockedType lockedType) { IAtsTeamDefinition teamDef = getTeamDefinitionHoldingVersions(); if (teamDef == null) { - return new ArrayList<IAtsVersion>(); + return new ArrayList<>(); } return teamDef.getVersions(releaseType, lockedType); } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AbstractRelatedWorkPackageColumn.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AbstractRelatedWorkPackageColumn.java index 5e4bcacf0e8..f32d517babb 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AbstractRelatedWorkPackageColumn.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AbstractRelatedWorkPackageColumn.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; public abstract class AbstractRelatedWorkPackageColumn implements IAtsColumn, IWorkPackageColumn { private final IAtsEarnedValueServiceProvider earnedValueServiceProvider; - private Map<ArtifactId, ArtifactToken> idToWorkPackage = new HashMap<ArtifactId, ArtifactToken>(); + private Map<ArtifactId, ArtifactToken> idToWorkPackage = new HashMap<>(); protected final AtsApi atsApi; public AbstractRelatedWorkPackageColumn(IAtsEarnedValueServiceProvider earnedValueServiceProvider, AtsApi atsApi) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnProviderCollector.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnProviderCollector.java index d8bd59e70ce..0211e3e67ab 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnProviderCollector.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnProviderCollector.java @@ -30,7 +30,7 @@ public class AtsColumnProviderCollector { public static List<IAtsColumnProvider> getColumnProviders() { if (columnProviders == null) { - columnProviders = new CopyOnWriteArrayList<IAtsColumnProvider>(); + columnProviders = new CopyOnWriteArrayList<>(); } return columnProviders; } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java index f328848b686..d2e5147b5c6 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/column/ev/AtsColumnService.java @@ -68,7 +68,7 @@ public class AtsColumnService implements IAtsColumnService { @Override public IAtsColumn getColumn(String id) { if (columnIdToAtsColumn == null) { - columnIdToAtsColumn = new HashMap<String, IAtsColumn>(); + columnIdToAtsColumn = new HashMap<>(); } // Get from cache diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java index 65d16604e55..40f61cc9ba8 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/internal/state/AtsStateFactory.java @@ -45,7 +45,7 @@ public class AtsStateFactory implements IAtsStateFactory { IAtsStateManager stateMgr = idToStateManager.get(workItem); TransactionId transId = idToTransactionId.get(workItem); TransactionId workItemTransaction = atsApi.getStoreService().getTransactionId(workItem); - if (stateMgr == null || (workItemTransaction.isValid() && workItemTransaction.notEqual(transId))) { + if (stateMgr == null || workItemTransaction.isValid() && workItemTransaction.notEqual(transId)) { stateMgr = new StateManager(workItem, logFactory, atsApi); idToStateManager.put(workItem, stateMgr); idToTransactionId.put(workItem, atsApi.getStoreService().getTransactionId(workItem)); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/rule/validate/RelationSetRule.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/rule/validate/RelationSetRule.java index 2466b9b7ee1..36c948f5e64 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/rule/validate/RelationSetRule.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/rule/validate/RelationSetRule.java @@ -35,7 +35,7 @@ public final class RelationSetRule extends AbstractValidationRule { this.relationEnum = relationEnum; this.minimumRelations = minimumRelations; this.ignoreArtifactTypes = - ignoreArtifactTypes.length == 0 ? new ArrayList<IArtifactType>() : Arrays.asList(ignoreArtifactTypes); + ignoreArtifactTypes.length == 0 ? new ArrayList<>() : Arrays.asList(ignoreArtifactTypes); } public boolean hasArtifactType(IArtifactType artType) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/rule/validate/UniqueNameRule.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/rule/validate/UniqueNameRule.java index 5cd795ac5e1..1945063195e 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/rule/validate/UniqueNameRule.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/rule/validate/UniqueNameRule.java @@ -35,7 +35,7 @@ public class UniqueNameRule extends AbstractValidationRule { private final IArtifactType artifactType; private final Collection<IdPair> idPairs = new LinkedList<>(); private final Map<IArtifactType, List<ArtifactToken>> artTypeToArtifacts = - new HashMap<IArtifactType, List<ArtifactToken>>(); + new HashMap<>(); public UniqueNameRule(IArtifactType artifactType, AtsApi atsApi) { super(atsApi); @@ -90,8 +90,8 @@ public class UniqueNameRule extends AbstractValidationRule { private boolean isImplementationDetailsChild(ArtifactId childArtifact, ArtifactId parentArtifact) { return atsApi.getStoreService().isOfType(parentArtifact, CoreArtifactTypes.SoftwareRequirement) && // - (atsApi.getStoreService().isOfType(childArtifact, CoreArtifactTypes.AbstractImplementationDetails) && // - atsApi.getRelationResolver().getParent(childArtifact).equals(parentArtifact)); + atsApi.getStoreService().isOfType(childArtifact, CoreArtifactTypes.AbstractImplementationDetails) && // + atsApi.getRelationResolver().getParent(childArtifact).equals(parentArtifact); } private void addIdPair(Long idA, Long idB) { diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java index 0f2ac6ec77f..a443c661924 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/util/AtsAbstractEarnedValueImpl.java @@ -157,7 +157,7 @@ public abstract class AtsAbstractEarnedValueImpl implements IAtsEarnedValueServi if (!(workItem instanceof IAtsTeamWorkflow)) { return 0; } - return getEstimatedHoursFromTasks((workItem), relatedToState); + return getEstimatedHoursFromTasks(workItem, relatedToState); } /** diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AtsVersionServiceImpl.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AtsVersionServiceImpl.java index e1fcccb3daa..3409cb5ed30 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AtsVersionServiceImpl.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/version/AtsVersionServiceImpl.java @@ -122,7 +122,7 @@ public class AtsVersionServiceImpl implements IAtsVersionService { @Override public void changesStored(IAtsChangeSet changes) { try { - HashMap<String, Object> properties = new HashMap<String, Object>(); + HashMap<String, Object> properties = new HashMap<>(); properties.put(AtsTopicEvent.WORK_ITEM_IDS_KEY, teamWf.getIdString()); properties.put(AtsTopicEvent.NEW_ATS_VERSION_ID, newVersion.getIdString()); properties.put(AtsTopicEvent.PREVIOUS_ATS_VERSION_ID, previousVersion.getIdString()); diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsImplementersService.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsImplementersService.java index bdf0fafe007..ff7ad19d005 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsImplementersService.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/AtsImplementersService.java @@ -120,7 +120,7 @@ public class AtsImplementersService implements IAtsImplementerService { implementers.addAll(getImplementersByState(workItem, PeerToPeerReviewState.Review)); IAtsPeerReviewRoleManager roleMgr = ((IAtsPeerToPeerReview) workItem).getRoleManager(); List<UserRole> userRoles = roleMgr.getUserRoles(); - for (IAtsUser user : (roleMgr.getRoleUsers(userRoles))) { + for (IAtsUser user : roleMgr.getRoleUsers(userRoles)) { implementers.add(user); } } diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/TeamWorkflowProviders.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/TeamWorkflowProviders.java index d80f5e2ebb6..a8795da0752 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/TeamWorkflowProviders.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/TeamWorkflowProviders.java @@ -23,7 +23,7 @@ public class TeamWorkflowProviders implements ITeamWorkflowProvidersLazy { private Log logger; private static final List<ITeamWorkflowProvider> teamWorkflowProviders = - new CopyOnWriteArrayList<ITeamWorkflowProvider>(); + new CopyOnWriteArrayList<>(); public void setLogger(Log logger) { this.logger = logger; diff --git a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java index 92c051f4c95..9eda18aa67e 100644 --- a/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java +++ b/plugins/org.eclipse.osee.ats.core/src/org/eclipse/osee/ats/core/workflow/transition/TransitionHelper.java @@ -115,7 +115,7 @@ public class TransitionHelper extends TransitionHelperAdapter { } public void addTransitionOption(TransitionOption transitionOption) { - List<TransitionOption> options = new ArrayList<TransitionOption>(Arrays.asList(this.transitionOption)); + List<TransitionOption> options = new ArrayList<>(Arrays.asList(this.transitionOption)); if (!options.contains(transitionOption)) { options.add(transitionOption); } @@ -123,7 +123,7 @@ public class TransitionHelper extends TransitionHelperAdapter { } public void removeTransitionOption(TransitionOption transitionOption) { - List<TransitionOption> options = new ArrayList<TransitionOption>(Arrays.asList(this.transitionOption)); + List<TransitionOption> options = new ArrayList<>(Arrays.asList(this.transitionOption)); if (options.contains(transitionOption)) { options.remove(transitionOption); } diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java index b00e85e8f00..ded62873ffd 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/AtsServerImpl.java @@ -84,7 +84,7 @@ public class AtsServerImpl extends AtsApiImpl implements IAtsServer { private boolean loggedNotificationDisabled = false; private final List<IAtsNotifierServer> notifiers = new CopyOnWriteArrayList<>(); private final Map<String, IAtsDatabaseConversion> externalConversions = - new ConcurrentHashMap<String, IAtsDatabaseConversion>(); + new ConcurrentHashMap<>(); private AtsActionEndpointApi actionEndpoint; private ExecutorAdmin executorAdmin; diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java index 860c7fb6f62..bd1b8a85897 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/AgileEndpointImpl.java @@ -750,7 +750,7 @@ public class AgileEndpointImpl implements AgileEndpointApi { } IAgileSprint sprint = atsApi.getAgileService().getAgileSprint(sprintId); Conditions.assertNotNull(sprint, "Invalid Sprint %s", sprintId); - if ((best && sprint.isCompletedOrCancelled()) || stored) { + if (best && sprint.isCompletedOrCancelled() || stored) { ArtifactToken rptArt = atsApi.getRelationResolver().getChildNamedOrNull(sprint, agileReportType.name()); if (rptArt != null) { return atsApi.getAttributeResolver().getSoleAttributeValue(rptArt, CoreAttributeTypes.NativeContent, null); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/operations/KanbanOperations.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/operations/KanbanOperations.java index 8cf0e9d768a..fb474bc37fa 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/operations/KanbanOperations.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/agile/operations/KanbanOperations.java @@ -167,9 +167,9 @@ public class KanbanOperations { } } } - String assigneesIdStr = (assigneeIds == null ? "" : Collections.toString("; ", assigneeIds)); + String assigneesIdStr = assigneeIds == null ? "" : Collections.toString("; ", assigneeIds); task.getAttributeMap().put("AssigneesIds", assigneesIdStr); - String assigneesStr = (assigneeNames == null ? "" : Collections.toString("; ", assigneeNames)); + String assigneesStr = assigneeNames == null ? "" : Collections.toString("; ", assigneeNames); task.getAttributeMap().put("AssigneesStr", assigneesStr); task.getAttributeMap().put("AssigneesStrShort", Strings.truncate(assigneesStr, 30, true)); } @@ -183,8 +183,8 @@ public class KanbanOperations { // "4345" : "As a user I will move the user right and left", // "6433" : "As a user I will move the user forward and backward" // }, - Set<String> rowNames = new HashSet<String>(sprintStories.size()); - Set<String> rowIds = new HashSet<String>(sprintStories.size()); + Set<String> rowNames = new HashSet<>(sprintStories.size()); + Set<String> rowIds = new HashSet<>(sprintStories.size()); for (ArtifactToken sprintStory : sprintStories) { String name = sprintStory.getName(); rowNames.add(name); @@ -213,8 +213,8 @@ public class KanbanOperations { // }, Set<IAtsUser> assigneeImplementers = Collections.setUnion(workItem.getStateMgr().getAssignees(), atsApi.getImplementerService().getImplementers(workItem)); - Set<String> assigneeNames = new HashSet<String>(assigneeImplementers.size()); - Set<String> assigneeIds = new HashSet<String>(assigneeImplementers.size()); + Set<String> assigneeNames = new HashSet<>(assigneeImplementers.size()); + Set<String> assigneeIds = new HashSet<>(assigneeImplementers.size()); for (IAtsUser user : assigneeImplementers) { if (!AtsCoreUsers.isSystemUser(user)) { teamMembers.add(user.getStoreObject()); @@ -333,7 +333,7 @@ public class KanbanOperations { task.setArtifactType(wItem.getArtifactTypeName()); task.getAttributeMap().put("Shortname", wItem.getAtsId()); IAtsVersion version = atsApi.getVersionService().getTargetedVersion(wItem); - task.getAttributeMap().put("versionName", (version != null ? version.getName() : "")); + task.getAttributeMap().put("versionName", version != null ? version.getName() : ""); Collection<IAgileFeatureGroup> featureGroups = atsApi.getAgileService().getFeatureGroups(aItem); if (!featureGroups.isEmpty()) { String grps = Collections.toString(",", featureGroups); @@ -343,7 +343,7 @@ public class KanbanOperations { task.setBranchGuid(artifact.getBranchIdString()); Collection<IAttribute<Object>> attributes = atsApi.getAttributeResolver().getAttributes(artifact); Collection<? extends AttributeTypeToken> attrTypes = atsApi.getStoreService().getAttributeTypes(); - Set<String> ais = new HashSet<String>(); + Set<String> ais = new HashSet<>(); if (!attributes.isEmpty()) { for (AttributeTypeToken attrType : attrTypes) { if (!attrType.getName().equals("ats.Log") && atsApi.getStoreService().isAttributeTypeValid(artifact, diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java index 36cf23249e2..bcf4c13d65a 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/AtsConfigEndpointImpl.java @@ -180,7 +180,7 @@ public final class AtsConfigEndpointImpl implements AtsConfigEndpointApi { Conditions.assertNotSentinel(introArt); ArtifactId artifact = tx.introduceArtifact(fromBranch, introArt); - if (relateToToken != null && (!relateToToken.getId().equals(Id.SENTINEL))) { + if (relateToToken != null && !relateToToken.getId().equals(Id.SENTINEL)) { relateToArt = orcsApi.getQueryFactory().fromBranch(newBranch).andId(relateToToken).getResults().getAtMostOneOrDefault( ArtifactReadable.SENTINEL); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java index 20fdcc776e9..7cf5ef5eec8 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ConfigJsonWriter.java @@ -289,7 +289,7 @@ public class ConfigJsonWriter implements MessageBodyWriter<IAtsConfigObject> { boolean datesAsLong = options.contains(WorkItemWriterOptions.DatesAsLong); if (!attributes.isEmpty()) { - List<Long> writtenTypes = new LinkedList<Long>(); + List<Long> writtenTypes = new LinkedList<>(); HashCollection<String, AttributeReadable<Object>> attrIdToAttrsMap = getAttributeMap(attributes); for (String attrId : attrIdToAttrsMap.keySet()) { List<AttributeReadable<Object>> attributeValues = attrIdToAttrsMap.getValues(attrId); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java index 5533f9ea1d2..2ff161bb057 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/config/ReportResource.java @@ -61,7 +61,7 @@ public class ReportResource { Set<Long> deletedArts = new HashSet<>(); Map<Integer, Pair<ChangeItem, Set<ChangeItem>>> artToChanges = - new HashMap<Integer, Pair<ChangeItem, Set<ChangeItem>>>(); + new HashMap<>(); buildArtIdToChangeMap(changes, artToChanges); buildLists(artToChanges, newArts, modArts, deletedArts); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsConfigQueryImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsConfigQueryImpl.java index f6e13b711d3..ed3c9d6cbec 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsConfigQueryImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsConfigQueryImpl.java @@ -42,7 +42,7 @@ public class AtsConfigQueryImpl extends AbstractAtsConfigQueryImpl { @Override public Collection<ArtifactId> runQuery() { - List<ArtifactId> results = new ArrayList<ArtifactId>(); + List<ArtifactId> results = new ArrayList<>(); Iterator<ArtifactReadable> iterator = query.getResults().iterator(); while (iterator.hasNext()) { results.add(iterator.next()); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java index 644dcf6c736..c4e72711f59 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/query/AtsQueryImpl.java @@ -44,7 +44,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { @Override public Collection<ArtifactId> runQuery() { - List<ArtifactId> results = new ArrayList<ArtifactId>(); + List<ArtifactId> results = new ArrayList<>(); Iterator<ArtifactReadable> iterator = query.getResults().iterator(); while (iterator.hasNext()) { results.add(iterator.next()); @@ -139,10 +139,10 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { AtsQueryImpl search = new AtsQueryImpl(atsApi, orcsApi); search.isOfType(AtsArtifactTypes.TeamWorkflow); if (teamDefIds != null && !teamDefIds.isEmpty()) { - search.andTeam(new ArrayList<Long>(teamDefIds)); + search.andTeam(new ArrayList<>(teamDefIds)); } if (aiIds != null && !aiIds.isEmpty()) { - search.andActionableItem(new ArrayList<Long>(aiIds)); + search.andActionableItem(new ArrayList<>(aiIds)); } if (versionId != null && versionId > 0) { search.andVersion(versionId); diff --git a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java index 1747278a011..e781fa32e74 100644 --- a/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java +++ b/plugins/org.eclipse.osee.ats.rest/src/org/eclipse/osee/ats/rest/internal/workitem/AtsActionEndpointImpl.java @@ -603,7 +603,7 @@ public final class AtsActionEndpointImpl implements AtsActionEndpointApi { private NewActionData getNewActionData(String userId, String actionItem, String title) { NewActionData newActionData = new NewActionData(); - List<String> actionIds = new ArrayList<String>(); + List<String> actionIds = new ArrayList<>(); actionIds.add(actionItem); newActionData.setAiIds(actionIds); newActionData.setTitle(title); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java index 4822ba33afb..1b7a5d7e900 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/AtsArtifactImageProvider.java @@ -35,7 +35,7 @@ import org.eclipse.osee.framework.ui.swt.OverlayImage.Location; */ public class AtsArtifactImageProvider extends ArtifactImageProvider { - private static Map<ArtifactImage, KeyedImage> keyedImageMap = new HashMap<ArtifactImage, KeyedImage>(); + private static Map<ArtifactImage, KeyedImage> keyedImageMap = new HashMap<>(); @Override public void init() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/PortPairsOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/PortPairsOperation.java index 46e34bb0f02..32a1d1b68ee 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/PortPairsOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/PortPairsOperation.java @@ -49,7 +49,7 @@ public final class PortPairsOperation extends AbstractOperation { if (pairLine.length != 2) { throw new OseeArgumentException("Invalid porting pairs"); } - this.portPairs.add(new Pair<String, String>(pairLine[0], pairLine[1])); + this.portPairs.add(new Pair<>(pairLine[0], pairLine[1])); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/WorkflowPortingBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/WorkflowPortingBlam.java index 6605f9a5689..462409c40b0 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/WorkflowPortingBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/WorkflowPortingBlam.java @@ -93,7 +93,7 @@ public class WorkflowPortingBlam extends AbstractBlam { private List<IAtsActionableItem> getActionableItems(IAtsActionableItem actionableItem) { List<IAtsActionableItem> actionableItems; if (actionableItem == null) { - actionableItems = new ArrayList<IAtsActionableItem>( + actionableItems = new ArrayList<>( AtsClientService.get().getWorkItemService().getActionableItemService().getActionableItems( sourceWorkflows.get(0))); } else { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/AbstractWizardItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/AbstractWizardItem.java index 2d6c5d029de..aa1a3e4a843 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/AbstractWizardItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/AbstractWizardItem.java @@ -331,7 +331,7 @@ public abstract class AbstractWizardItem implements IAtsWizardItem, IDynamicWidg } private void wizardCompletedUnPlanned(IAtsTeamWorkflow teamWf, IAtsTeamDefinition teamDef, IAtsChangeSet changes) { - XCheckBox unPlanedCheckBox = ((XCheckBox) teamDefFieldToWidget.get(teamDef, WizardFields.UnPlannedWork)); + XCheckBox unPlanedCheckBox = (XCheckBox) teamDefFieldToWidget.get(teamDef, WizardFields.UnPlannedWork); if (unPlanedCheckBox != null) { boolean unplanned = unPlanedCheckBox.isChecked(); changes.setSoleAttributeValue(teamWf, AtsAttributeTypes.UnPlannedWork, unplanned); @@ -339,7 +339,7 @@ public abstract class AbstractWizardItem implements IAtsWizardItem, IDynamicWidg } private void wizardCompletedFeatureGroup(IAtsTeamWorkflow teamWf, IAtsTeamDefinition teamDef, IAtsChangeSet changes) { - XComboViewer featureCombo = ((XComboViewer) teamDefFieldToWidget.get(teamDef, WizardFields.FeatureGroup)); + XComboViewer featureCombo = (XComboViewer) teamDefFieldToWidget.get(teamDef, WizardFields.FeatureGroup); if (featureCombo != null) { IAgileFeatureGroup featureGroup = (IAgileFeatureGroup) featureCombo.getSelected(); if (featureGroup != null) { @@ -349,7 +349,7 @@ public abstract class AbstractWizardItem implements IAtsWizardItem, IDynamicWidg } private void wizardCompletedTargetedVersion(IAtsTeamWorkflow teamWf, IAtsTeamDefinition teamDef, IAtsChangeSet changes) { - XComboViewer versionCombo = ((XComboViewer) teamDefFieldToWidget.get(teamDef, WizardFields.TargetedVersion)); + XComboViewer versionCombo = (XComboViewer) teamDefFieldToWidget.get(teamDef, WizardFields.TargetedVersion); if (versionCombo != null) { IAtsVersion version = (IAtsVersion) versionCombo.getSelected(); if (version != null) { @@ -359,7 +359,7 @@ public abstract class AbstractWizardItem implements IAtsWizardItem, IDynamicWidg } private void wizardCompletedSprint(IAtsTeamWorkflow teamWf, IAtsTeamDefinition teamDef, IAtsChangeSet changes) { - XComboViewer sprintCombo = ((XComboViewer) teamDefFieldToWidget.get(teamDef, WizardFields.Sprint)); + XComboViewer sprintCombo = (XComboViewer) teamDefFieldToWidget.get(teamDef, WizardFields.Sprint); if (sprintCombo != null) { IAgileSprint sprint = (IAgileSprint) sprintCombo.getSelected(); if (sprint != null) { @@ -419,7 +419,7 @@ public abstract class AbstractWizardItem implements IAtsWizardItem, IDynamicWidg private void wizardCompletedAssignees(IAtsTeamWorkflow teamWf, IAtsTeamDefinition teamDef) { XAssigneesHyperlinkWidget assigneesWidget = - ((XAssigneesHyperlinkWidget) teamDefFieldToWidget.get(teamDef, WizardFields.Assignees)); + (XAssigneesHyperlinkWidget) teamDefFieldToWidget.get(teamDef, WizardFields.Assignees); if (assigneesWidget != null && !assigneesWidget.getSelected().isEmpty()) { teamWf.getStateMgr().setAssignees(assigneesWidget.getSelected()); } @@ -427,7 +427,7 @@ public abstract class AbstractWizardItem implements IAtsWizardItem, IDynamicWidg private void wizardCompletedOriginator(IAtsTeamWorkflow teamWf, IAtsTeamDefinition teamDef, IAtsChangeSet changes) { XOriginatorHyperlinkWidget originatorWidget = - ((XOriginatorHyperlinkWidget) teamDefFieldToWidget.get(teamDef, WizardFields.Originator)); + (XOriginatorHyperlinkWidget) teamDefFieldToWidget.get(teamDef, WizardFields.Originator); if (originatorWidget != null && originatorWidget.getSelected() != null) { teamWf.getStateMgr().setCreatedBy(originatorWidget.getSelected(), true, new Date(), changes); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java index de748a0dc33..24d6a197918 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/actions/wizard/NewActionPage1.java @@ -149,7 +149,7 @@ public class NewActionPage1 extends WizardPage implements IsEnabled { new Label(aiComp, SWT.NONE).setText("Select Actionable Items:"); CheckBoxStateFilteredTreeViewer<IAtsActionableItem> treeViewer = - new CheckBoxStateFilteredTreeViewer<IAtsActionableItem>(aiComp, + new CheckBoxStateFilteredTreeViewer<>(aiComp, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); treeViewer.getViewer().getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); treeViewer.getViewer().setContentProvider(new AITreeContentProvider(Active.Active)); @@ -194,7 +194,7 @@ public class NewActionPage1 extends WizardPage implements IsEnabled { }; }); - return new Pair<CheckBoxStateFilteredTreeViewer<IAtsActionableItem>, Text>(treeViewer, descriptionLabel); + return new Pair<>(treeViewer, descriptionLabel); } public static class AITreeLabelProvider extends CheckBoxStateTreeLabelProvider { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/navigate/CreateNewAgileSprint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/navigate/CreateNewAgileSprint.java index f3a25f6f78a..a1b96ace7c1 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/navigate/CreateNewAgileSprint.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/navigate/CreateNewAgileSprint.java @@ -74,7 +74,7 @@ public class CreateNewAgileSprint extends XNavigateItemAction { if (firstArtifact == null) { throw new OseeCoreException("Must make a selection"); } - int teamId = (firstArtifact).getArtId(); + int teamId = firstArtifact.getArtId(); for (String name : ed.getEntry().split(",")) { newSprint.setName(name); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/navigate/OpenAgileSprint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/navigate/OpenAgileSprint.java index 877e9f64076..f98d5e1e290 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/navigate/OpenAgileSprint.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/agile/navigate/OpenAgileSprint.java @@ -102,7 +102,7 @@ public class OpenAgileSprint extends XNavigateItemAction { public String getText(Object element) { if (element instanceof IAtsWorkItem) { return String.format("%s %s", super.getText(element), - (((IAtsWorkItem) element).isInWork() ? "" : " - (" + ((IAtsWorkItem) element).getStateMgr().getCurrentStateName() + ")")); + ((IAtsWorkItem) element).isInWork() ? "" : " - (" + ((IAtsWorkItem) element).getStateMgr().getCurrentStateName() + ")"); } return super.getText(element); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BaseGoalsColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BaseGoalsColumn.java index c3f6ab6c54f..d5f50001f4d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BaseGoalsColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/BaseGoalsColumn.java @@ -113,7 +113,7 @@ public abstract class BaseGoalsColumn extends XViewerAtsColumn implements IXView } Collection<Artifact> allGoals = Collections.castAll( AtsClientService.get().getQueryService().createQuery(getWorkItemType()).getResultArtifacts().getList()); - Collection<IAtsWorkItem> allInWork = new ArrayList<IAtsWorkItem>(); + Collection<IAtsWorkItem> allInWork = new ArrayList<>(); for (Artifact art : allGoals) { IAtsGoal goal = AtsClientService.get().getWorkItemService().getGoal(art); if (goal != null && goal.isInWork()) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksColumn.java index 3ed87cebb3b..a6a142eb01f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksColumn.java @@ -69,7 +69,7 @@ public class NumberOfTasksColumn extends XViewerAtsColumn implements IXViewerVal return Collections.toString(", ", strs); } if (element instanceof TeamWorkFlowArtifact) { - int num = AtsClientService.get().getTaskService().getTasks(((TeamWorkFlowArtifact) element)).size(); + int num = AtsClientService.get().getTaskService().getTasks((TeamWorkFlowArtifact) element).size(); if (num == 0) { return ""; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksRemainingColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksRemainingColumn.java index 746b6007bd3..df26a745063 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksRemainingColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/NumberOfTasksRemainingColumn.java @@ -73,7 +73,7 @@ public class NumberOfTasksRemainingColumn extends XViewerAtsColumn implements IX return Collections.toString(", ", strs); } if (element instanceof TeamWorkFlowArtifact) { - int num = getNumTasksInWork(((TeamWorkFlowArtifact) element)); + int num = getNumTasksInWork((TeamWorkFlowArtifact) element); if (num == 0) { return ""; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/RemainingHoursColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/RemainingHoursColumn.java index b7e8edcfd29..441f3f5ab74 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/RemainingHoursColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/column/RemainingHoursColumn.java @@ -132,7 +132,7 @@ public class RemainingHoursColumn extends XViewerAtsColumn implements IXViewerVa public static double getRemainingHours(Object object) { if (object instanceof AbstractWorkflowArtifact) { - return AtsClientService.get().getEarnedValueService().getRemainHoursTotal(((AbstractWorkflowArtifact) object)); + return AtsClientService.get().getEarnedValueService().getRemainHoursTotal((AbstractWorkflowArtifact) object); } else if (Artifacts.isOfType(object, AtsArtifactTypes.Action)) { double hours = 0; // Add up hours for all children diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java index 619f4a45a86..9d9c3a4284a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/AtsBulkLoad.java @@ -66,7 +66,7 @@ public class AtsBulkLoad { tasks.add(art); } } - Set<Artifact> arts = new HashSet<Artifact>(); + Set<Artifact> arts = new HashSet<>(); if (!actions.isEmpty()) { arts.addAll(RelationManager.getRelatedArtifacts(actions, 3, AtsRelationTypes.TeamWfToTask_Task, AtsRelationTypes.TeamWorkflowToReview_Review, AtsRelationTypes.ActionToWorkflow_Action)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java index 98938df79ba..1a64f5fcdc0 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/config/copy/CopyAtsConfigurationOperation.java @@ -45,7 +45,7 @@ public class CopyAtsConfigurationOperation extends AbstractOperation { Set<Artifact> processedFromAis; private final Map<IAtsTeamDefinition, IAtsTeamDefinition> fromTeamDefToNewTeamDefMap = - new HashMap<IAtsTeamDefinition, IAtsTeamDefinition>(); + new HashMap<>(); public CopyAtsConfigurationOperation(ConfigData data, XResultData resultData) { super("Copy ATS Configuration", Activator.PLUGIN_ID); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeArtifactEventManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeArtifactEventManager.java index 58d8282db6e..1d3c9c9c6d1 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeArtifactEventManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeArtifactEventManager.java @@ -153,7 +153,7 @@ public class WfeArtifactEventManager implements IArtifactEventListener { } } if (!refreshed && awa.isTeamWorkflow() && AtsClientService.get().getTaskService().hasTasks( - ((TeamWorkFlowArtifact) awa))) { + (TeamWorkFlowArtifact) awa)) { try { // If related review has made a change, redraw for (IAtsTask task : AtsClientService.get().getTaskService().getTasks(awa, awa.getStateDefinition())) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeBranchEventManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeBranchEventManager.java index bdce44d7984..4cfa9c4c72b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeBranchEventManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeBranchEventManager.java @@ -63,7 +63,7 @@ public class WfeBranchEventManager implements IBranchEventListener { @Override public void handleBranchEvent(Sender sender, BranchEvent branchEvent) { - for (IWfeEventHandler handler : new ArrayList<IWfeEventHandler>(handlers)) { + for (IWfeEventHandler handler : new ArrayList<>(handlers)) { if (handler.isDisposed()) { handlers.remove(handler); } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeOperationsSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeOperationsSection.java index c238ae3fc89..a2c0c72e67c 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeOperationsSection.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeOperationsSection.java @@ -73,7 +73,7 @@ public class WfeOperationsSection extends SectionPart { private synchronized void registerAdvancedSectionsFromExtensionPoints() { if (operationsSectionProviders == null) { operationsSectionProviders = new ArrayList<>(); - ExtensionDefinedObjects<IWfeOperationsSection> extensions = new ExtensionDefinedObjects<IWfeOperationsSection>( + ExtensionDefinedObjects<IWfeOperationsSection> extensions = new ExtensionDefinedObjects<>( Activator.PLUGIN_ID + ".AtsAdvancedOperationAction", "AtsAdvancedOperationAction", "classname", true); for (IWfeOperationsSection item : extensions.getObjects()) { operationsSectionProviders.add(item); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeOutlinePage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeOutlinePage.java index 04e7dc7f1a3..ef22783a955 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeOutlinePage.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeOutlinePage.java @@ -398,11 +398,11 @@ public class WfeOutlinePage extends ContentOutlinePage { private void getChildrenFromWorkDefinitionMatch(Object element, List<Object> items) { try { items.addAll(AtsClientService.get().getWorkDefinitionService().getStatesOrderedByOrdinal( - ((IAtsWorkDefinition) element))); + (IAtsWorkDefinition) element)); } catch (OseeStateException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); } - items.add(new WrappedPercentWeight(((IAtsWorkDefinition) element))); + items.add(new WrappedPercentWeight((IAtsWorkDefinition) element)); } private void getUsersFromDecisionReviewOpt(IAtsDecisionReviewOption revOpt, List<Object> items) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeWorkflowSection.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeWorkflowSection.java index 0dc92751e19..fd754802294 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeWorkflowSection.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/WfeWorkflowSection.java @@ -317,7 +317,7 @@ public class WfeWorkflowSection extends SectionPart { GridLayout layout = new GridLayout(6, false); comp.setLayout(layout); comp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - allXWidgets.add(new TaskInfoXWidget(getManagedForm(), ((TeamWorkFlowArtifact) sma), state, comp, 2)); + allXWidgets.add(new TaskInfoXWidget(getManagedForm(), (TeamWorkFlowArtifact) sma, state, comp, 2)); } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java index c0eec47af95..68be66c67f8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StateHoursSpentXWidget.java @@ -86,7 +86,7 @@ public class StateHoursSpentXWidget extends XHyperlinkLabelValueSelection { setEditable(isCurrentState && !sma.isReadOnly()); boolean breakoutNeeded = false; if (sma instanceof TeamWorkFlowArtifact && AtsClientService.get().getTaskService().hasTasks( - ((TeamWorkFlowArtifact) sma))) { + (TeamWorkFlowArtifact) sma)) { sb.append(String.format("\n Task Hours: %5.2f", HoursSpentUtil.getHoursSpentFromStateTasks(sma, page, AtsClientService.get().getServices()))); breakoutNeeded = true; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java index 49ad09c1c33..684fb64e03e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/widget/StatePercentCompleteXWidget.java @@ -85,7 +85,7 @@ public class StatePercentCompleteXWidget extends XHyperlinkLabelValueSelection { if (sma instanceof TeamWorkFlowArtifact && AtsClientService.get().getTaskService().hasTasks( (TeamWorkFlowArtifact) sma)) { sb.append(String.format("\n Task Percent: %d", - AtsClientService.get().getEarnedValueService().getPercentCompleteFromTasks((sma), page))); + AtsClientService.get().getEarnedValueService().getPercentCompleteFromTasks(sma, page))); breakoutNeeded = true; } if (sma.isTeamWorkflow() && AtsClientService.get().getReviewService().hasReviews((TeamWorkFlowArtifact) sma)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/OpenWorkPackageByIdAction.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/OpenWorkPackageByIdAction.java index 138a9317b02..58333d2c1b4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/OpenWorkPackageByIdAction.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/ev/OpenWorkPackageByIdAction.java @@ -55,7 +55,7 @@ public class OpenWorkPackageByIdAction extends Action { public void run() { EntryDialog dialog = new EntryDialog(getText(), "Enter Work Package id, activity id or financial id"); if (dialog.open() == Window.OK) { - final List<String> ids = new LinkedList<String>(); + final List<String> ids = new LinkedList<>(); for (String str : dialog.getEntry().split(",")) { str = str.replaceAll("^\\s+", ""); str = str.replaceAll("\\s+$", ""); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java index 473d4eceb65..c1d5d28d7cc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/ConvertVersionToAgileSprint.java @@ -62,7 +62,7 @@ public class ConvertVersionToAgileSprint extends XNavigateItemAction { client.getQueryService().createQuery(AtsArtifactTypes.AgileTeam).andActive(true).getConfigObjects()); AtsConfigCheckTreeDialog<IAgileTeam> teamDialog = - new AtsConfigCheckTreeDialog<IAgileTeam>(getName(), "Select Agile Team", activeAgileTeams, true); + new AtsConfigCheckTreeDialog<>(getName(), "Select Agile Team", activeAgileTeams, true); IAgileTeam agileTeam = null; if (teamDialog.open() != 0) { return; @@ -79,7 +79,7 @@ public class ConvertVersionToAgileSprint extends XNavigateItemAction { Collection<IAtsVersion> versions = client.getVersionService().getVersions(teamDefHoldingVersions); AtsConfigCheckTreeDialog<IAtsVersion> versionDialog = - new AtsConfigCheckTreeDialog<IAtsVersion>(getName(), "Select Version(s)", versions, true); + new AtsConfigCheckTreeDialog<>(getName(), "Select Version(s)", versions, true); Collection<IAtsVersion> selectedVersions = null; if (versionDialog.open() != 0) { return; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java index 0d4eaf698dd..59c304cb5e9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusBlam.java @@ -537,7 +537,7 @@ public class DetailedTestStatusBlam extends AbstractBlam { progress = 0; } Set<Artifact> foundProcedures = - new HashSet<Artifact>(tpRequirement.getRelatedArtifacts(CoreRelationTypes.Validation__Validator)); + new HashSet<>(tpRequirement.getRelatedArtifacts(CoreRelationTypes.Validation__Validator)); Set<Artifact> toAdd = new HashSet<>(); toAdd = foundProcedures; requirementNameToTestProcedures.put(tpRequirement.getName(), toAdd); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java index 8af49bba6a8..c30fbffc308 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/DetailedTestStatusOld.java @@ -97,7 +97,7 @@ public class DetailedTestStatusOld extends AbstractBlam { private ISheetWriter excelWriter; private final CompositeKeyHashMap<String, String, RequirementStatus> reqTaskMap = - new CompositeKeyHashMap<String, String, RequirementStatus>(); + new CompositeKeyHashMap<>(); private final StringBuilder sumFormula = new StringBuilder(500); private HashCollectionSet<Artifact, String> requirementToCodeUnitsMap; private final HashMap<String, String> testProcedureInfo = new HashMap<>(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java index 0930460a8be..c5256539299 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/operation/ExportChangeReportOperation.java @@ -79,7 +79,7 @@ public final class ExportChangeReportOperation extends AbstractOperation { logf("Starting %s, processing %d workflows.", getClass().getSimpleName(), workflows.size()); sortWorkflows(); - Set<String> skippedTypes = new HashSet<String>(); + Set<String> skippedTypes = new HashSet<>(); CompareDataCollector collector = new CompareDataCollector() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/query/AtsQueryServiceClient.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/query/AtsQueryServiceClient.java index 0b146731263..0c2150f1446 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/query/AtsQueryServiceClient.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/query/AtsQueryServiceClient.java @@ -186,7 +186,7 @@ public class AtsQueryServiceClient { } else if (obj instanceof IAtsObject) { result = getArtifact(((IAtsObject) obj).getStoreObject(), atsApi.getAtsBranch()); } else if (obj instanceof ArtifactId) { - result = getArtifact(((ArtifactId) obj), atsApi.getAtsBranch()); + result = getArtifact((ArtifactId) obj, atsApi.getAtsBranch()); } else if (obj instanceof Id) { result = getArtifact(((Id) obj).getId()); } else if (obj instanceof Long) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/internal/query/AtsConfigQueryImpl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/internal/query/AtsConfigQueryImpl.java index b0d84ba6a5b..e6fbe2a1a18 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/internal/query/AtsConfigQueryImpl.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/internal/query/AtsConfigQueryImpl.java @@ -40,7 +40,7 @@ public class AtsConfigQueryImpl extends AbstractAtsConfigQueryImpl { @Override public Collection<ArtifactId> runQuery() { - List<ArtifactId> results = new ArrayList<ArtifactId>(); + List<ArtifactId> results = new ArrayList<>(); Iterator<Artifact> iterator = query.getResults().iterator(); while (iterator.hasNext()) { results.add(iterator.next()); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/internal/query/AtsQueryImpl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/internal/query/AtsQueryImpl.java index 187f6ea5c81..93ed7f4666f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/internal/query/AtsQueryImpl.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/internal/query/AtsQueryImpl.java @@ -44,7 +44,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { @Override public Collection<ArtifactId> runQuery() { - List<ArtifactId> results = new ArrayList<ArtifactId>(); + List<ArtifactId> results = new ArrayList<>(); Iterator<Artifact> iterator = query.getResults().iterator(); while (iterator.hasNext()) { results.add(iterator.next()); @@ -130,7 +130,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { AtsQueryImpl search = new AtsQueryImpl(atsApi); search.isOfType(AtsArtifactTypes.TeamWorkflow); if (teamDefIds != null && !teamDefIds.isEmpty()) { - search.andTeam(new ArrayList<Long>(teamDefIds)); + search.andTeam(new ArrayList<>(teamDefIds)); } if (teamWorkflowAttr != null && !teamWorkflowAttr.isEmpty()) { for (AtsAttributeQuery attrQuery : teamWorkflowAttr) { @@ -138,7 +138,7 @@ public class AtsQueryImpl extends AbstractAtsQueryImpl { } } if (aiIds != null && !aiIds.isEmpty()) { - search.andActionableItem(new ArrayList<Long>(aiIds)); + search.andActionableItem(new ArrayList<>(aiIds)); } if (versionId != null && versionId > 0) { search.andVersion(versionId); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/AbstractXComboViewerSearchWidget.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/AbstractXComboViewerSearchWidget.java index 01f918a15ff..14b5fc76d1d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/AbstractXComboViewerSearchWidget.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/search/widget/AbstractXComboViewerSearchWidget.java @@ -62,7 +62,7 @@ public abstract class AbstractXComboViewerSearchWidget<ObjectType extends Object public void setup(XWidget widget) { if (widget != null) { XComboViewer combo = (XComboViewer) widget; - List<Object> input = new ArrayList<Object>(); + List<Object> input = new ArrayList<>(); input.addAll(Collections.castAll(getInput())); if (!input.contains(CLEAR)) { input.add(CLEAR); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java index 975bf1f7cd8..b9537fac6e7 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/AtsDeleteManager.java @@ -57,7 +57,7 @@ public class AtsDeleteManager { }; public static void handleDeletePurgeAtsObject(Collection<Artifact> selectedArts, boolean forcePend, DeleteOption... deleteOption) { - final Collection<DeleteOption> deleteOptions = new ArrayList<DeleteOption>(Arrays.asList(deleteOption)); + final Collection<DeleteOption> deleteOptions = new ArrayList<>(Arrays.asList(deleteOption)); boolean purgeOption = deleteOptions.contains(DeleteOption.Purge); List<Artifact> delArts = new ArrayList<>(); StringBuilder artBuilder = new StringBuilder(); @@ -147,11 +147,11 @@ public class AtsDeleteManager { AtsClientService.get().getAtsId(deleteArt), deleteArt.getName()) + "\n"); if (deleteArt.isOfType(AtsArtifactTypes.Action)) { for (IAtsTeamWorkflow art : AtsClientService.get().getWorkItemService().getTeams(deleteArt)) { - atsDelete(((AbstractWorkflowArtifact) art), relatedArts, ignoredArts); + atsDelete((AbstractWorkflowArtifact) art, relatedArts, ignoredArts); } } else if (deleteArt.isOfType(AtsArtifactTypes.AbstractWorkflowArtifact)) { WorkflowEditor.close(java.util.Collections.singleton((AbstractWorkflowArtifact) deleteArt), true); - atsDelete(((AbstractWorkflowArtifact) deleteArt), relatedArts, ignoredArts); + atsDelete((AbstractWorkflowArtifact) deleteArt, relatedArts, ignoredArts); for (Artifact loopArt : relatedArts) { if (loopArt.notEqual(deleteArt)) { delBuilder.append( @@ -192,7 +192,7 @@ public class AtsDeleteManager { atsDelete(reviewArt, deleteArts, allRelated); } for (IAtsTask task : AtsClientService.get().getTaskService().getTasks((TeamWorkFlowArtifact) awa)) { - atsDelete(((AbstractWorkflowArtifact) task.getStoreObject()), deleteArts, allRelated); + atsDelete((AbstractWorkflowArtifact) task.getStoreObject(), deleteArts, allRelated); } } } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java index 4b69de291d4..e5dcb47a89f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/Import/ExcelAtsActionArtifactExtractor.java @@ -391,7 +391,7 @@ public class ExcelAtsActionArtifactExtractor { public Map<IAtsTeamDefinition, Collection<IAtsActionableItem>> getTeamDefToAias(Collection<IAtsActionableItem> aias) { Map<IAtsTeamDefinition, Collection<IAtsActionableItem>> teamDefToAias = - new HashMap<IAtsTeamDefinition, Collection<IAtsActionableItem>>(); + new HashMap<>(); for (IAtsActionableItem aia : aias) { IAtsTeamDefinition teamDef = TeamDefinitions.getImpactedTeamDefs(Arrays.asList(aia)).iterator().next(); if (teamDefToAias.containsKey(teamDef)) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/ArtifactResolverImpl.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/ArtifactResolverImpl.java index aa407251703..29d32a8935b 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/ArtifactResolverImpl.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/ArtifactResolverImpl.java @@ -30,10 +30,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.ArtifactTypeManager; */ public class ArtifactResolverImpl implements IArtifactResolver { - private final AtsApi atsApi; - public ArtifactResolverImpl(AtsApi atsApi) { - this.atsApi = atsApi; } @Override diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsStoreService.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsStoreService.java index 14b3c580af0..8c14f984e65 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsStoreService.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/internal/AtsStoreService.java @@ -77,7 +77,7 @@ public class AtsStoreService implements IAtsStoreService { public List<IAtsWorkItem> reload(Collection<IAtsWorkItem> workItems) { List<IAtsWorkItem> results = new ArrayList<>(); try { - List<Artifact> artifacts = new LinkedList<Artifact>(); + List<Artifact> artifacts = new LinkedList<>(); for (IAtsWorkItem workItem : workItems) { if (workItem.getStoreObject() != null && workItem.getStoreObject() instanceof Artifact) { artifacts.add(AtsClientService.get().getQueryServiceClient().getArtifact(workItem)); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchEnablement.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchEnablement.java index 39550ee308f..03cd3cab4fb 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchEnablement.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/XWorkingBranchEnablement.java @@ -153,7 +153,7 @@ public class XWorkingBranchEnablement { return enablementData; } }; - return new FutureTask<BranchEnablementData>(callable); + return new FutureTask<>(callable); } }; @@ -187,7 +187,7 @@ public class XWorkingBranchEnablement { public boolean isWorkingBranchCreationInProgress() { return AtsClientService.get().getBranchService().isWorkingBranchCreationInProgress( - teamArt) || (workingBranch.isValid() && BranchManager.getState(workingBranch).isCreationInProgress()); + teamArt) || workingBranch.isValid() && BranchManager.getState(workingBranch).isCreationInProgress(); } public boolean isWorkingBranchCommitInProgress() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsAttributeValueColumn.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsAttributeValueColumn.java index f50e5638229..2bc4eb9e70d 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsAttributeValueColumn.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/xviewer/column/XViewerAtsAttributeValueColumn.java @@ -140,7 +140,7 @@ public class XViewerAtsAttributeValueColumn extends XViewerAtsAttributeColumn im } } } - if (Artifacts.isOfType(element, AtsArtifactTypes.Action) && (isActionRollupWithDefault())) { + if (Artifacts.isOfType(element, AtsArtifactTypes.Action) && isActionRollupWithDefault()) { Set<String> strs = new LinkedHashSet<>(); for (IAtsTeamWorkflow team : AtsClientService.get().getWorkItemService().getTeams(element)) { String str = getColumnText(team, column, columnIndex); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerContentProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerContentProvider.java index 705c9032b13..6da086c41eb 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerContentProvider.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/walker/ActionWalkerContentProvider.java @@ -62,7 +62,7 @@ public class ActionWalkerContentProvider implements IGraphEntityContentProvider view.setActiveGraphItem(taskWrapper); } } else { - objs.addAll(AtsClientService.get().getTaskService().getTasks(((TeamWorkFlowArtifact) entity))); + objs.addAll(AtsClientService.get().getTaskService().getTasks((TeamWorkFlowArtifact) entity)); } if (!view.isShowAll() && ReviewManager.getReviews(teamArt).size() > 4) { ReviewWrapper reviewWrapper = new ReviewWrapper(teamArt); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/Shape.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/Shape.java index 8bab4886926..de9b18989f9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/Shape.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workdef/viewer/model/Shape.java @@ -189,14 +189,14 @@ public abstract class Shape extends ModelElement { * Return a List of outgoing Connections. */ public List<Connection> getSourceConnections() { - return new ArrayList<Connection>(sourceConnections); + return new ArrayList<>(sourceConnections); } /** * Return a List of incoming Connections. */ public List<Connection> getTargetConnections() { - return new ArrayList<Connection>(targetConnections); + return new ArrayList<>(targetConnections); } /** diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalXViewerFactory.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalXViewerFactory.java index 5c60eac2a46..ad3f3dc4e07 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalXViewerFactory.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/goal/GoalXViewerFactory.java @@ -36,7 +36,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xviewer.skynet.SkynetXViewer */ public class GoalXViewerFactory extends SkynetXViewerFactory { - private GoalArtifact soleGoalArtifact; + private final GoalArtifact soleGoalArtifact; private List<? extends XViewerColumn> getGoalViewerVisibleColumns() { List<XViewerColumn> columns = Arrays.asList(GoalOrderColumn.getInstance(), GoalOrderVoteColumn.getInstance(), diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/ReviewProviders.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/ReviewProviders.java index b9b3cebe1ee..d5532c923d5 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/ReviewProviders.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/review/ReviewProviders.java @@ -31,7 +31,7 @@ public final class ReviewProviders { public synchronized static List<IReviewProvider> getAtsReviewProviders() { if (reviewProvider == null) { - ExtensionDefinedObjects<IReviewProvider> objects = new ExtensionDefinedObjects<IReviewProvider>( + ExtensionDefinedObjects<IReviewProvider> objects = new ExtensionDefinedObjects<>( Activator.PLUGIN_ID + ".AtsReviewProvider", "AtsReviewProvider", "classname", true); reviewProvider = objects.getObjects(); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/stateitem/internal/AtsStateItemCoreManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/stateitem/internal/AtsStateItemCoreManager.java index 03d855a0f2e..210816d7a6f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/stateitem/internal/AtsStateItemCoreManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/stateitem/internal/AtsStateItemCoreManager.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.plugin.core.util.ExtensionDefinedObjects; public class AtsStateItemCoreManager { private static final ExtensionDefinedObjects<IAtsStateItemCore> extensionDefinedObjects = - new ExtensionDefinedObjects<IAtsStateItemCore>(Activator.PLUGIN_ID + ".AtsStateItemCore", "AtsStateItemCore", + new ExtensionDefinedObjects<>(Activator.PLUGIN_ID + ".AtsStateItemCore", "AtsStateItemCore", "classname", true); public static List<IAtsStateItemCore> getStateItems() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskComposite.java index 53dfce945c3..cc6f1fc7ec8 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskComposite.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/TaskComposite.java @@ -50,14 +50,12 @@ public class TaskComposite extends WorldComposite { private final IXTaskViewer iXTaskViewer; private TaskXViewer taskXViewer; - private final IDirtiableEditor dirtiableEditor; boolean tasksEditable; private final IAtsTeamWorkflow teamWf; public TaskComposite(IXTaskViewer iXTaskViewer, IWorldEditor worldEditor, IXViewerFactory xViewerFactory, Composite parent, int style, IDirtiableEditor dirtiableEditor, boolean tasksEditable, IAtsTeamWorkflow teamWf) { super(worldEditor, xViewerFactory, parent, style, false); this.iXTaskViewer = iXTaskViewer; - this.dirtiableEditor = dirtiableEditor; this.tasksEditable = tasksEditable; this.teamWf = teamWf; taskXViewer.setTasksEditable(tasksEditable); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/internal/AtsTaskCache.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/internal/AtsTaskCache.java index df145d22b66..c45cca0dd4e 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/internal/AtsTaskCache.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/task/internal/AtsTaskCache.java @@ -26,7 +26,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; public class AtsTaskCache { private static Map<TeamWorkFlowArtifact, Collection<TaskArtifact>> teamTasksCache = - new ConcurrentHashMap<TeamWorkFlowArtifact, Collection<TaskArtifact>>(); + new ConcurrentHashMap<>(); private AtsTaskCache() { // Utility class diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/transition/TransitionListeners.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/transition/TransitionListeners.java index 92dd7f8538b..e8a1549d8d4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/transition/TransitionListeners.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/workflow/transition/TransitionListeners.java @@ -53,7 +53,7 @@ public final class TransitionListeners { listeners.add(new DecisionReviewDefinitionManager()); listeners.add(new PeerReviewDefinitionManager()); - ExtensionDefinedObjects<ITransitionListener> objects = new ExtensionDefinedObjects<ITransitionListener>( + ExtensionDefinedObjects<ITransitionListener> objects = new ExtensionDefinedObjects<>( "org.eclipse.osee.ats.AtsTransitionListener", "AtsTransitionListener", "classname"); listeners.addAll(objects.getObjects()); loaded = true; diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItems.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItems.java index 2a0bafa2ec5..d760523772a 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItems.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/AtsWorldEditorItems.java @@ -19,7 +19,7 @@ import org.eclipse.osee.framework.plugin.core.util.ExtensionDefinedObjects; public class AtsWorldEditorItems { private static final ExtensionDefinedObjects<IAtsWorldEditorItem> items = - new ExtensionDefinedObjects<IAtsWorldEditorItem>("org.eclipse.osee.ats.AtsWorldEditorItem", "AtsWorldEditorItem", + new ExtensionDefinedObjects<>("org.eclipse.osee.ats.AtsWorldEditorItem", "AtsWorldEditorItem", "classname"); public static List<IAtsWorldEditorItem> getItems() { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldComposite.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldComposite.java index 1900c204bfb..179708da5f9 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldComposite.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldComposite.java @@ -168,8 +168,8 @@ public class WorldComposite extends Composite implements IOseeTreeReportProvider return; } - List<Artifact> worldArts = new LinkedList<Artifact>(); - List<Artifact> otherArts = new LinkedList<Artifact>(); + List<Artifact> worldArts = new LinkedList<>(); + List<Artifact> otherArts = new LinkedList<>(); for (Artifact art : arts) { if (AtsObjects.isAtsWorkItemOrAction(art)) { worldArts.add(art); diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java index 514049398d5..3eba80731c4 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditorParameterSearchItem.java @@ -65,9 +65,8 @@ import org.eclipse.ui.forms.widgets.FormToolkit; */ public abstract class WorldEditorParameterSearchItem extends WorldSearchItem implements IWorldEditorParameterProvider, IDynamicWidgetLayoutListener, IXWidgetOptionResolver { - private CustomizeData customizeData; private TableLoadOption[] tableLoadOptions; - protected final Map<String, XWidget> xWidgets = new HashMap<String, XWidget>(); + protected final Map<String, XWidget> xWidgets = new HashMap<>(); protected StringBuilder xmlSb; private final Pattern displayName = Pattern.compile("displayName=\"(.*?)\""); private String shortName = ""; @@ -115,7 +114,7 @@ public abstract class WorldEditorParameterSearchItem extends WorldSearchItem imp if (workItemType != null && workItemType.get().isEmpty()) { return new Result("You must select a workflow type."); } - if ((teamDef != null && teamDef.get() != null && teamDef.get().isEmpty()) && (ai != null && ai.get().isEmpty()) && isTeamDefWorkItemTypesSelected()) { + if (teamDef != null && teamDef.get() != null && teamDef.get().isEmpty() && ai != null && ai.get().isEmpty() && isTeamDefWorkItemTypesSelected()) { return new Result("You must select either Actionable Item(s) or Team Definition(s)."); } return Result.TrueResult; @@ -158,7 +157,6 @@ public abstract class WorldEditorParameterSearchItem extends WorldSearchItem imp @Override public void setCustomizeData(CustomizeData customizeData) { - this.customizeData = customizeData; } @Override diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerEventManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerEventManager.java index f1a790b2ca4..9a5072593bc 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerEventManager.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXViewerEventManager.java @@ -63,7 +63,7 @@ public class WorldXViewerEventManager { private static final class NotificationHandler implements IArtifactEventListener { private final Collection<IWorldViewerEventHandler> handlers = - new CopyOnWriteArrayList<IWorldViewerEventHandler>(); + new CopyOnWriteArrayList<>(); public NotificationHandler() { OseeEventManager.addListener(this); @@ -107,7 +107,7 @@ public class WorldXViewerEventManager { artifactEvent.get(EventModType.Deleted, EventModType.Purged); // create list of items to updatePreComputedColumnValues; includes arts and parent arts - Set<Artifact> allModAndParents = new HashSet<>((modifiedArts.size() * 2) + relModifiedArts.size()); + Set<Artifact> allModAndParents = new HashSet<>(modifiedArts.size() * 2 + relModifiedArts.size()); for (Artifact art : modifiedArts) { allModAndParents.add(art); if (art instanceof IAtsWorkItem) { diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXWidgetActionPage.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXWidgetActionPage.java index 4f29663b610..035edb1918f 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXWidgetActionPage.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldXWidgetActionPage.java @@ -116,7 +116,7 @@ public class WorldXWidgetActionPage extends FormPage { private WorkflowMetricsUI workflowMetricsUi; public WorldXWidgetActionPage(WorldEditor worldEditor) { - super(worldEditor, ID, (worldEditor.isTaskEditor() ? "Tasks" : "Actions")); + super(worldEditor, ID, worldEditor.isTaskEditor() ? "Tasks" : "Actions"); this.toolkit = new XFormToolkit(); this.worldEditor = worldEditor; } diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchOperation.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchOperation.java index 654ce19a76b..4d1959de5bf 100644 --- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchOperation.java +++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/search/MultipleIdSearchOperation.java @@ -90,7 +90,7 @@ public class MultipleIdSearchOperation extends AbstractOperation implements IWor return; } if (resultNonAtsArts.size() > 0) { - MassArtifactEditor.editArtifacts("Open Artifact(s)", new ArrayList<Artifact>(resultNonAtsArts)); + MassArtifactEditor.editArtifacts("Open Artifact(s)", new ArrayList<>(resultNonAtsArts)); } if (resultAtsArts.size() > 0) { // If requested world editor and it's already been opened there, diff --git a/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/internal/AuthenticationAdminImpl.java b/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/internal/AuthenticationAdminImpl.java index b327a49b61a..322e63bd24a 100644 --- a/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/internal/AuthenticationAdminImpl.java +++ b/plugins/org.eclipse.osee.authentication.admin/src/org/eclipse/osee/authentication/admin/internal/AuthenticationAdminImpl.java @@ -30,7 +30,7 @@ import org.eclipse.osee.logger.Log; public class AuthenticationAdminImpl implements AuthenticationAdmin { private final Map<String, AuthenticationProvider> authenticationProviders = - new ConcurrentHashMap<String, AuthenticationProvider>(); + new ConcurrentHashMap<>(); private Log logger; private AuthenticationConfiguration config; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java index 9b1aa94ca3b..779772c43c7 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/ArtifactEventTest.java @@ -875,7 +875,7 @@ public class ArtifactEventTest { private final Set<EventBasicGuidArtifact> resultEventArtifacts = new HashSet<>(); private final Set<EventBasicGuidRelation> resultEventRelations = new HashSet<>(); private final Set<DefaultBasicUuidRelationReorder> resultEventReorders = - new HashSet<DefaultBasicUuidRelationReorder>(); + new HashSet<>(); private Sender resultSender; diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java index e107fffdd4e..de087de2f0b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/BranchEventTest.java @@ -309,7 +309,7 @@ public class BranchEventTest { while (events[sequence] == null) { wait(); } - return new Pair<Sender, BranchEvent>(senders[sequence], events[sequence]); + return new Pair<>(senders[sequence], events[sequence]); } }; }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/DoorsArtifactExtractorTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/DoorsArtifactExtractorTest.java index 5b15d26996b..2d783c8ad5b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/DoorsArtifactExtractorTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/DoorsArtifactExtractorTest.java @@ -99,7 +99,7 @@ public class DoorsArtifactExtractorTest { private Artifact theArtifact; private final List<String> content = Arrays.asList("<img src=\"Image Content_0>\""); - private final Collection<InputStream> imageList = new LinkedList<InputStream>(); + private final Collection<InputStream> imageList = new LinkedList<>(); @ClassRule public static TemporaryFolder folder = new TemporaryFolder(); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java index 26a424ee89c..3bb18f37fc0 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/AttributeTypeEditPresenterTest.java @@ -255,7 +255,7 @@ public class AttributeTypeEditPresenterTest { @Override public Collection<AttributeTypeToken> getSelections(OperationType operationType, String title, String message, List<AttributeTypeToken> input) { - setSelectionInfo(new Pair<String, String>(title, message)); + setSelectionInfo(new Pair<>(title, message)); setInput(input); setOperationType(operationType); setShowInfo(null); diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ImageManagerTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ImageManagerTest.java index db1aa44cc22..e14dd76342b 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ImageManagerTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/ImageManagerTest.java @@ -55,13 +55,13 @@ public abstract class ImageManagerTest { @org.junit.AfterClass public static void testCleanup() throws Exception { List<IHealthStatus> stats = monitorLog.getAllLogs(); - for (IHealthStatus stat : new ArrayList<IHealthStatus>(stats)) { + for (IHealthStatus stat : new ArrayList<>(stats)) { if (stat.getException() != null) { fail("Exception: " + Lib.exceptionToString(stat.getException())); } } StringBuffer sb = new StringBuffer(); - for (IHealthStatus stat : new ArrayList<IHealthStatus>(stats)) { + for (IHealthStatus stat : new ArrayList<>(stats)) { if (stat.getMessage().contains("Unable to load the image for") && !stat.getMessage().contains("nothere")) { sb.append(stat.getMessage() + "\n"); } diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/StringGuidsToArtifactListOperationTest.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/StringGuidsToArtifactListOperationTest.java index 2254ddc331b..a31bd421f31 100644 --- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/StringGuidsToArtifactListOperationTest.java +++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/ui/skynet/StringGuidsToArtifactListOperationTest.java @@ -122,7 +122,7 @@ public class StringGuidsToArtifactListOperationTest { private final IXWidgetInputAddable widgetMock_Equal = new IXWidgetInputAddable() { @Override public void addToInput(Collection<Object> objects) { - List<Object> uniques = Collections.setComplement(new HashSet<Object>(objects), new HashSet<Object>(artifacts)); + List<Object> uniques = Collections.setComplement(new HashSet<>(objects), new HashSet<>(artifacts)); Assert.assertTrue(uniques.isEmpty()); } }; @@ -130,7 +130,7 @@ public class StringGuidsToArtifactListOperationTest { private final IXWidgetInputAddable widgetMock_2Uniques = new IXWidgetInputAddable() { @Override public void addToInput(Collection<Object> objects) { - List<Object> uniques = Collections.setComplement(new HashSet<Object>(artifacts), new HashSet<Object>(objects)); + List<Object> uniques = Collections.setComplement(new HashSet<>(artifacts), new HashSet<>(objects)); Assert.assertTrue(uniques.size() == 2); //generateGarbageClipboardContent() takes out 1 and 5 } }; diff --git a/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/ConsoleAdmin.java b/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/ConsoleAdmin.java index ed6bb536ff0..2d35fad8d40 100644 --- a/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/ConsoleAdmin.java +++ b/plugins/org.eclipse.osee.console.admin/src/org/eclipse/osee/console/admin/internal/ConsoleAdmin.java @@ -28,7 +28,7 @@ import org.osgi.framework.ServiceRegistration; public class ConsoleAdmin { private final Map<ConsoleCommand, Map<String, String>> pending = - new ConcurrentHashMap<ConsoleCommand, Map<String, String>>(); + new ConcurrentHashMap<>(); private Log logger; private EventService eventService; diff --git a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/FindErroneousEmbeddedLinksBlam.java b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/FindErroneousEmbeddedLinksBlam.java index c9e23f0b3d3..11f2e6c71a2 100644 --- a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/FindErroneousEmbeddedLinksBlam.java +++ b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/FindErroneousEmbeddedLinksBlam.java @@ -151,7 +151,7 @@ public class FindErroneousEmbeddedLinksBlam extends AbstractBlam { } catch (Exception e) { String subsystem = artifact.getSoleAttributeValueAsString(CoreAttributeTypes.Subsystem, ""); excelWriter.writeRow("Invalid", artifact.getName(), artifact.getArtifactType().getName(), artifact.getGuid(), - subsystem, (linkGuid == null ? "NULL" : linkGuid)); + subsystem, linkGuid == null ? "NULL" : linkGuid); } } diff --git a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/PublishSystemLevelSSDD.java b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/PublishSystemLevelSSDD.java index 83eb3c2ceb3..bf6cbb2b9c9 100644 --- a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/PublishSystemLevelSSDD.java +++ b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/PublishSystemLevelSSDD.java @@ -187,7 +187,7 @@ public class PublishSystemLevelSSDD extends AbstractBlam { List<Artifact> relatedArtifacts = systemRequirement.getRelatedArtifacts(CoreRelationTypes.Allocation__Component); excludeArtifacts(relatedArtifacts.iterator()); - List<Artifact> allocatedSubsystems = new ArrayList<Artifact>(relatedArtifacts); + List<Artifact> allocatedSubsystems = new ArrayList<>(relatedArtifacts); Collections.sort(allocatedSubsystems); for (Artifact allocatedSubsystem : allocatedSubsystems) { excelWriter.writeCell("X", Arrays.binarySearch(allSubsystems, allocatedSubsystem) + 2); diff --git a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/PublishWithSpecifiedTemplate.java b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/PublishWithSpecifiedTemplate.java index f0fa51f60e1..2dc15891f09 100644 --- a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/PublishWithSpecifiedTemplate.java +++ b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/blam/operation/PublishWithSpecifiedTemplate.java @@ -201,7 +201,7 @@ public class PublishWithSpecifiedTemplate extends AbstractBlam { @Override public void run() { double secPerArt = 2; - double minutes = (totalSize * secPerArt) / 60; + double minutes = totalSize * secPerArt / 60; if (isDiff && totalSize > maxArtsForQuickDiff && !MessageDialog.openConfirm( Display.getDefault().getActiveShell(), "Continue with Word Diff", @@ -231,7 +231,7 @@ public class PublishWithSpecifiedTemplate extends AbstractBlam { parseQueryForBranchName(orcsQuery); //Parse JSON returned from query - ArrayList<Artifact> artifacts = new ArrayList<Artifact>(); + ArrayList<Artifact> artifacts = new ArrayList<>(); try { JSONObject jsonObject = new JSONObject(result); JSONArray results = jsonObject.getJSONArray("results"); diff --git a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/ArtifactOperations.java b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/ArtifactOperations.java index 8c3a6e08cc0..87eb3b8d12b 100644 --- a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/ArtifactOperations.java +++ b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/ArtifactOperations.java @@ -131,7 +131,7 @@ public class ArtifactOperations { StringBuilder qualFacilityBuilder = new StringBuilder(); try { List<String> methods = - new ArrayList<String>(artifact.getAttributesToStringList(CoreAttributeTypes.QualificationMethod)); + new ArrayList<>(artifact.getAttributesToStringList(CoreAttributeTypes.QualificationMethod)); Collections.sort(methods); for (int index = 0; index < methods.size(); index++) { String qualMethod = methods.get(index); diff --git a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/RequirementTraceabilityData.java b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/RequirementTraceabilityData.java index 02886a671f7..d1a4638ad81 100644 --- a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/RequirementTraceabilityData.java +++ b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/RequirementTraceabilityData.java @@ -114,7 +114,7 @@ public class RequirementTraceabilityData { for (Entry<String, Artifact> entry : testProcedureBranchReqsToReqsBranchMap.entrySet()) { Artifact requirement = entry.getValue(); Set<Artifact> foundProcedures = - new HashSet<Artifact>(requirement.getRelatedArtifacts(CoreRelationTypes.Validation__Validator)); + new HashSet<>(requirement.getRelatedArtifacts(CoreRelationTypes.Validation__Validator)); ViewIdUtility.removeExcludedArtifacts(foundProcedures.iterator(), excludedArtifactIdMap); Set<Artifact> toAdd = new HashSet<>(); if (testProceduresFilter.isEmpty() != true) { diff --git a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/ScriptTraceabilityOperation.java b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/ScriptTraceabilityOperation.java index 8cf4f043a4c..28b40ef6267 100644 --- a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/ScriptTraceabilityOperation.java +++ b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/ScriptTraceabilityOperation.java @@ -248,7 +248,7 @@ public class ScriptTraceabilityOperation extends TraceabilityProviderOperation { String textContent = null; boolean traceMatch = false; - subSystem = (isGitBased) ? getSubsystem(sourceFile.getPath(), + subSystem = isGitBased ? getSubsystem(sourceFile.getPath(), gitSubsystemMatcher) : getSubsystem(sourceFile.getPath(), subsystemMatcher); if (traceMark.getTraceType().equals("Uses")) { diff --git a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/report/StdTestToCsciTable.java b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/report/StdTestToCsciTable.java index 9833bf58d2c..dc6f9cf7d10 100644 --- a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/report/StdTestToCsciTable.java +++ b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/report/StdTestToCsciTable.java @@ -143,7 +143,7 @@ public class StdTestToCsciTable implements ISimpleTable { } } - for (String partition : new TreeSet<String>(partitionToQualificationMethod.keySet())) { + for (String partition : new TreeSet<>(partitionToQualificationMethod.keySet())) { List<String> units = new ArrayList<>(partitionToQualificationMethod.getValues(partition)); Collections.sort(units); for (String codeUnit : units) { @@ -165,7 +165,7 @@ public class StdTestToCsciTable implements ISimpleTable { // Combine Test Scripts and Test Procedures for (Artifact requirement : source.getAllSwRequirements()) { - List<String> testScripts = new ArrayList<String>(); + List<String> testScripts = new ArrayList<>(); requirementsToCodeUnits.forEachValue(requirement, testScripts::add); toReturn.put(requirement, testScripts); } diff --git a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/report/StpTestToCsciTable.java b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/report/StpTestToCsciTable.java index 5eb75d6e882..39fe79ebd2e 100644 --- a/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/report/StpTestToCsciTable.java +++ b/plugins/org.eclipse.osee.define.ide/src/org/eclipse/osee/define/ide/traceability/report/StpTestToCsciTable.java @@ -100,7 +100,7 @@ public class StpTestToCsciTable implements ISimpleTable { Collection<Artifact> directRequirements = source.getDirectSwRequirements(); HashCollectionSet<String, Artifact> partitionMap = ArtifactOperations.sortByPartition(directRequirements); - for (String partition : new TreeSet<String>(partitionMap.keySet())) { + for (String partition : new TreeSet<>(partitionMap.keySet())) { Collection<Artifact> artifacts = partitionMap.getValues(partition); artifacts = ArtifactOperations.sortByParagraphNumbers(artifacts); for (Artifact artifact : artifacts) { diff --git a/plugins/org.eclipse.osee.define.rest.test/src/org/eclipse/osee/define/rest/internal/SafetyCriticalityLookupTest.java b/plugins/org.eclipse.osee.define.rest.test/src/org/eclipse/osee/define/rest/internal/SafetyCriticalityLookupTest.java index 61a8181c5a0..b4897db070c 100644 --- a/plugins/org.eclipse.osee.define.rest.test/src/org/eclipse/osee/define/rest/internal/SafetyCriticalityLookupTest.java +++ b/plugins/org.eclipse.osee.define.rest.test/src/org/eclipse/osee/define/rest/internal/SafetyCriticalityLookupTest.java @@ -22,7 +22,7 @@ import org.junit.rules.ExpectedException; */ public class SafetyCriticalityLookupTest { private final DoubleKeyHashMap<String, String, String> criticalityTable = - new DoubleKeyHashMap<String, String, String>(); + new DoubleKeyHashMap<>(); @Rule public ExpectedException thrown = ExpectedException.none(); diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/DataRightsStreamingOutput.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/DataRightsStreamingOutput.java index 27823570c07..2ec0dcb8605 100644 --- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/DataRightsStreamingOutput.java +++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/DataRightsStreamingOutput.java @@ -49,8 +49,8 @@ public final class DataRightsStreamingOutput implements StreamingOutput { private final String codeRoot; private final TraceAccumulator traceAccumulator; private final Map<CaseInsensitiveString, ArtifactReadable> nameToReqMap = - new LinkedHashMap<CaseInsensitiveString, ArtifactReadable>(); - private final List<ArtifactReadable> noTraceReqs = new ArrayList<ArtifactReadable>(); + new LinkedHashMap<>(); + private final List<ArtifactReadable> noTraceReqs = new ArrayList<>(); private ExcelXmlWriter writer; private final ActivityLog activityLog; private static final IArtifactType WCAFE = TokenFactory.createArtifactType(204509162766367L, "WCAFE"); @@ -109,7 +109,7 @@ public final class DataRightsStreamingOutput implements StreamingOutput { String reqName = req.getName(); nameToReqMap.put(new CaseInsensitiveString(reqName), req); - ArrayList<String> codeUnits = new ArrayList<String>(traceAccumulator.getFiles(reqName)); + ArrayList<String> codeUnits = new ArrayList<>(traceAccumulator.getFiles(reqName)); if (codeUnits.isEmpty()) { writeReq(req, reqName); diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/SafetyStreamingOutput.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/SafetyStreamingOutput.java index d4d1671407d..219488ff616 100644 --- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/SafetyStreamingOutput.java +++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/SafetyStreamingOutput.java @@ -35,7 +35,7 @@ public final class SafetyStreamingOutput implements StreamingOutput { this.orcsApi = orcsApi; this.branchId = branchId; this.codeRoot = codeRoot; - this.validate = (isOn != null && isOn.equals("on")) ? true : false; + this.validate = isOn != null && isOn.equals("on") ? true : false; } @Override diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/UpdateBookmarkIds.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/UpdateBookmarkIds.java index 3c63572665e..0e166f4cd8d 100644 --- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/UpdateBookmarkIds.java +++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/UpdateBookmarkIds.java @@ -10,13 +10,9 @@ *******************************************************************************/ package org.eclipse.osee.define.rest.internal.wordupdate; -import java.io.StringWriter; import java.util.Collection; import java.util.HashMap; import java.util.Map; -import javax.xml.stream.XMLOutputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamWriter; import javax.xml.xpath.XPath; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -140,20 +136,4 @@ public class UpdateBookmarkIds { } return bookMarkId; } - - @SuppressWarnings("unused") - private static String xmlSectionToString(Node root) throws XMLStreamException { - StringWriter writer = new StringWriter(); - XMLOutputFactory factory = XMLOutputFactory.newInstance(); - XMLStreamWriter xmlWriter = null; - try { - xmlWriter = factory.createXMLStreamWriter(writer); - Jaxp.writeNode(xmlWriter, root, false); - } finally { - if (xmlWriter != null) { - xmlWriter.close(); - } - } - return writer.toString(); - } } diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordMLApplicabilityHandler.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordMLApplicabilityHandler.java index d92cf0406ea..73b7b86f5cc 100644 --- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordMLApplicabilityHandler.java +++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordMLApplicabilityHandler.java @@ -124,8 +124,8 @@ public class WordMLApplicabilityHandler { searchIndex = matcher.end(); } - } else if ((endFeature != null && endFeature.contains( - WordCoreUtil.FEATUREAPP)) || (endConfig != null && endConfig.contains(WordCoreUtil.CONFIGAPP))) { + } else if (endFeature != null && endFeature.contains( + WordCoreUtil.FEATUREAPP) || endConfig != null && endConfig.contains(WordCoreUtil.CONFIGAPP)) { ApplicabilityBlock applicabilityBlock = getFullApplicabilityBlock(matcher, toReturn); @@ -171,72 +171,6 @@ public class WordMLApplicabilityHandler { return true; } - // Leaving this method here for now....it is no longer being called and upon - // confirmation (in the release) that no major impacts, can be removed - @SuppressWarnings("unused") - private String removeExtraParagraphs(String fullWordMl, String toInsert, ApplicabilityBlock applicabilityBlock) { - int startInsertIndex = applicabilityBlock.getStartInsertIndex(); - - if (!applicabilityBlock.isInTable() && (toInsert.isEmpty() || toInsert.startsWith( - WordCoreUtil.WHOLE_END_PARAGRAPH))) { - String findParagraphStart = fullWordMl.substring(0, startInsertIndex); - int paragraphStartIndex = findParagraphStart.lastIndexOf(WordCoreUtil.START_PARAGRAPH); - - // check this doesn't contain feature/config tags - String beginningText = fullWordMl.substring(paragraphStartIndex, startInsertIndex); - - if (toInsert.isEmpty() && paragraphStartIndex > 0 && !beginningText.matches( - "(?i).*?(" + WordCoreUtil.BEGINFEATURE + "|" + WordCoreUtil.BEGINCONFIG + "|" + WordCoreUtil.ENDCONFIG + "|" + WordCoreUtil.ENDFEATURE + ").*?")) { - int endInsertIndex = applicabilityBlock.getEndInsertIndex(); - String findParagraphEnd = fullWordMl.substring(endInsertIndex); - - int paragraphEndIndex = findParagraphEnd.indexOf(WordCoreUtil.END_PARAGRAPH) + endInsertIndex + 6; - if (paragraphEndIndex >= 0) { - // check this doesn't contain feature/config tags - String endText = fullWordMl.substring(endInsertIndex, paragraphEndIndex); - - if (paragraphEndIndex >= 0 && WordCoreUtil.textOnly(endText).isEmpty() && !endText.matches( - "(?i).*?(" + WordCoreUtil.BEGINFEATURE + "|" + WordCoreUtil.BEGINCONFIG + "|" + WordCoreUtil.ENDCONFIG + "|" + WordCoreUtil.ENDFEATURE + ").*?")) { - applicabilityBlock.setStartInsertIndex(paragraphStartIndex); - applicabilityBlock.setStartTextIndex(paragraphStartIndex); - applicabilityBlock.setEndInsertIndex(paragraphEndIndex); - applicabilityBlock.setEndTextIndex(paragraphEndIndex); - } - } - } else { - String findParagraphEnd = fullWordMl.substring(startInsertIndex); - int paragraphEndIndex = findParagraphEnd.indexOf(WordCoreUtil.END_PARAGRAPH) + startInsertIndex + 6; - - if (paragraphStartIndex >= 0 && paragraphEndIndex >= 0 && paragraphEndIndex > paragraphStartIndex) { - String fullParagraph = fullWordMl.substring(paragraphStartIndex, paragraphEndIndex); - fullParagraph = - fullParagraph.replaceFirst("(?i)" + WordCoreUtil.BEGINFEATURE + "|" + WordCoreUtil.BEGINCONFIG, ""); - - if (WordCoreUtil.textOnly(fullParagraph).isEmpty()) { - toInsert = toInsert.replaceFirst(WordCoreUtil.WHOLE_END_PARAGRAPH, ""); - applicabilityBlock.setStartInsertIndex(paragraphStartIndex); - applicabilityBlock.setStartTextIndex(paragraphEndIndex); - } - } - } - } - - if (!applicabilityBlock.isInTable() && toInsert.matches( - ".*?<w:p wsp:rsid[^>]+><w:pPr><w:spacing w:after=[^>]+></w:spacing></w:pPr><w:r><w:t>$")) { - - int origLength = toInsert.length(); - int lastParaIndex = toInsert.lastIndexOf(WordCoreUtil.START_PARAGRAPH); - if (lastParaIndex >= 0) { - toInsert = toInsert.substring(0, lastParaIndex); - applicabilityBlock.setEndTextIndex(applicabilityBlock.getEndTextIndex() - (origLength - lastParaIndex)); - applicabilityBlock.setEndInsertIndex( - applicabilityBlock.getEndInsertIndex() + WordCoreUtil.WHOLE_END_PARAGRAPH.length()); - } - } - - return toInsert; - } - // End Bracket can contain multiple feature/value pairs private boolean isValidFeatureBracket(String optionalEndBracket) { String text = WordCoreUtil.textOnly(optionalEndBracket); diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordTemplateContentRendererHandler.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordTemplateContentRendererHandler.java index 43176a6e765..b5f5240ac25 100644 --- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordTemplateContentRendererHandler.java +++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordTemplateContentRendererHandler.java @@ -126,7 +126,7 @@ public class WordTemplateContentRendererHandler { data = data.replaceAll(PGNUMTYPE_START_1, ""); } - return new Pair<String, Set<String>>(data, unknownGuids); + return new Pair<>(data, unknownGuids); } } @@ -134,6 +134,6 @@ public class WordTemplateContentRendererHandler { } private boolean isWtcViewIdValid(WordTemplateContentData wtcData) { - return (wtcData.getViewId() != null && wtcData.getViewId().notEqual(ArtifactId.SENTINEL)); + return wtcData.getViewId() != null && wtcData.getViewId().notEqual(ArtifactId.SENTINEL); } } diff --git a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordUpdateArtifact.java b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordUpdateArtifact.java index d70d4fee3ee..005f3ba405c 100644 --- a/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordUpdateArtifact.java +++ b/plugins/org.eclipse.osee.define.rest/src/org/eclipse/osee/define/rest/internal/wordupdate/WordUpdateArtifact.java @@ -214,7 +214,7 @@ public class WordUpdateArtifact { updateChange.setBranch(tx.getBranch()); if (updateChange.hasSafetyRelatedArtifactChange()) { try { - HashMap<String, Object> properties = new HashMap<String, Object>(); + HashMap<String, Object> properties = new HashMap<>(); properties.put(SafetyWorkflowEventHandler.SAFETY_EVENT_BRANCH_ID, tx.getBranch()); properties.put(SafetyWorkflowEventHandler.SAFETY_EVENT_USER_ART, account); Event event = new Event(SafetyWorkflowEventHandler.SAFETY_EVENT_TOPIC, properties); diff --git a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java index eb02232060f..d88224a2b3e 100644 --- a/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java +++ b/plugins/org.eclipse.osee.disposition.rest.model/src/org/eclipse/osee/disposition/model/DispoAnnotationData.java @@ -170,7 +170,7 @@ public class DispoAnnotationData { public void disconnect() { this.isConnected = false; - this.idsOfCoveredDiscrepancies = new ArrayList<String>(); + this.idsOfCoveredDiscrepancies = new ArrayList<>(); } public void setResolutionTypeValid(boolean resolutionTypeValid) { diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/importer/AnnotationCopierTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/importer/AnnotationCopierTest.java index cceafe8093c..8f674860365 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/importer/AnnotationCopierTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/importer/AnnotationCopierTest.java @@ -61,8 +61,8 @@ public class AnnotationCopierTest { public void setup() { sourceItem = new DispoItemData(); sourceItem.setGuid(mockId4); - List<DispoAnnotationData> sourceAnnotations = new ArrayList<DispoAnnotationData>(); - Map<String, Discrepancy> sourceDescrepancies = new HashMap<String, Discrepancy>(); + List<DispoAnnotationData> sourceAnnotations = new ArrayList<>(); + Map<String, Discrepancy> sourceDescrepancies = new HashMap<>(); discrepancy1 = new Discrepancy(); discrepancy1.setId(mockId1); @@ -148,7 +148,7 @@ public class AnnotationCopierTest { destItem.setDiscrepanciesList(new HashMap<String, Discrepancy>()); // First set the Destination Item's discrepancies the same as the source - Map<String, Discrepancy> destDiscrepancies = new HashMap<String, Discrepancy>(); + Map<String, Discrepancy> destDiscrepancies = new HashMap<>(); destDiscrepancies.put(discrepancy1.getId(), discrepancy1); destDiscrepancies.put(discrepancy2.getId(), discrepancy2); destDiscrepancies.put(discrepancy3.getId(), discrepancy3); @@ -187,7 +187,7 @@ public class AnnotationCopierTest { destItem.setDiscrepanciesList(new HashMap<String, Discrepancy>()); // First set the Destination Item's discrepancies the same as the source - Map<String, Discrepancy> destDiscrepancies = new HashMap<String, Discrepancy>(); + Map<String, Discrepancy> destDiscrepancies = new HashMap<>(); destDiscrepancies.put(discrepancy1.getId(), discrepancy1); destDiscrepancies.put(discrepancy2.getId(), discrepancy2); destDiscrepancies.put(discrepancy3.getId(), discrepancy3); @@ -204,7 +204,7 @@ public class AnnotationCopierTest { annotationD1.setResolutionType(DispoStrings.Test_Unit_Resolution); annotationD1.setResolution("file444.dat"); annotationD1.setIndex(0); - List<DispoAnnotationData> destAnnotations = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> destAnnotations = new ArrayList<>(); destAnnotations.add(annotationD1.getIndex(), annotationD1); destItem.setAnnotationsList(destAnnotations); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/importer/DispoItemDataCopierTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/importer/DispoItemDataCopierTest.java index efa2442e97b..1db6272bc2e 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/importer/DispoItemDataCopierTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/importer/DispoItemDataCopierTest.java @@ -74,7 +74,7 @@ public class DispoItemDataCopierTest { Map<String, Discrepancy> discrepanciesList = oldItemTemp.getDiscrepanciesList(); // We know the item has discrepancies at points 9-14 - List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsList = new ArrayList<>(); addAnnotation("9", annotationsList, discrepanciesList); addAnnotation("10", annotationsList, discrepanciesList); addAnnotation("11", annotationsList, discrepanciesList); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoApiTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoApiTest.java index ba6e667aa30..d83547c8e6d 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoApiTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoApiTest.java @@ -322,7 +322,7 @@ public class DispoApiTest { boolean actual = dispoApi.editDispoItem(branch, itemId.getGuid(), newItem, author.getIdString()); assertTrue(actual); - Map<String, Discrepancy> discrepanciesList = new HashMap<String, Discrepancy>(); + Map<String, Discrepancy> discrepanciesList = new HashMap<>(); newItem.setDiscrepanciesList(discrepanciesList); actual = dispoApi.editDispoItem(branch, itemId.getGuid(), newItem, author.getIdString()); assertFalse(actual); diff --git a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoConnectorTest.java b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoConnectorTest.java index 9cefe224edc..2690d76a45e 100644 --- a/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoConnectorTest.java +++ b/plugins/org.eclipse.osee.disposition.rest.test/src/org/eclipse/osee/disposition/rest/internal/DispoConnectorTest.java @@ -49,7 +49,7 @@ public class DispoConnectorTest { dispoItem = new DispoItemData(); dispoConnector = new DispoConnector(); - Map<String, Discrepancy> discrepancies = new HashMap<String, Discrepancy>(); + Map<String, Discrepancy> discrepancies = new HashMap<>(); for (int i = 1; i <= 5; i++) { Discrepancy discrepancy = new Discrepancy(); @@ -86,11 +86,11 @@ public class DispoConnectorTest { annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("Code"); annotationOne.setId(annotIdOne); - List<String> idsOfCoveredDisc = new ArrayList<String>(); + List<String> idsOfCoveredDisc = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); - List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsList = new ArrayList<>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); @@ -128,11 +128,11 @@ public class DispoConnectorTest { annotationOne.setResolutionType("Modify_Code"); annotationOne.setIsAnalyze(true); annotationOne.setId(annotIdOne); - List<String> idsOfCoveredDisc = new ArrayList<String>(); + List<String> idsOfCoveredDisc = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); - List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsList = new ArrayList<>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); @@ -168,11 +168,11 @@ public class DispoConnectorTest { annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("Code"); annotationOne.setId(annotIdOne); - List<String> idsOfCoveredDisc = new ArrayList<String>(); + List<String> idsOfCoveredDisc = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); - List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsList = new ArrayList<>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); @@ -202,11 +202,11 @@ public class DispoConnectorTest { annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("Code"); annotationOne.setId(annotIdOne); - List<String> idsOfCoveredDisc = new ArrayList<String>(); + List<String> idsOfCoveredDisc = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); - List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsList = new ArrayList<>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); @@ -236,11 +236,11 @@ public class DispoConnectorTest { annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("Code"); annotationOne.setId(annotIdOne); - List<String> idsOfCoveredDisc = new ArrayList<String>(); + List<String> idsOfCoveredDisc = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); dispoConnector.connectAnnotation(annotationOne, dispoItem.getDiscrepanciesList()); - List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsList = new ArrayList<>(); annotationsList.add(annotationOne); dispoItem.setAnnotationsList(annotationsList); @@ -264,25 +264,25 @@ public class DispoConnectorTest { DispoAnnotationData annotationOne = new DispoAnnotationData(); annotationOne.setLocationRefs("1-5"); annotationOne.setId(annotIdOne); - List<String> idsOfCoveredDiscOne = new ArrayList<String>(); + List<String> idsOfCoveredDiscOne = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscOne); DispoAnnotationData annotationTwo = new DispoAnnotationData(); annotationTwo.setLocationRefs("12-14"); annotationTwo.setId(annotIdTwo); - List<String> idsOfCoveredDiscTwo = new ArrayList<String>(); + List<String> idsOfCoveredDiscTwo = new ArrayList<>(); annotationTwo.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscTwo); DispoAnnotationData annotationThree = new DispoAnnotationData(); annotationThree.setLocationRefs("16, 20, 18"); annotationThree.setId(annotIdThree); - List<String> idsOfCoveredDiscThree = new ArrayList<String>(); + List<String> idsOfCoveredDiscThree = new ArrayList<>(); annotationThree.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscThree); DispoAnnotationData annotationFour = new DispoAnnotationData(); annotationFour.setLocationRefs("15, 17"); annotationFour.setId(annotIdFive); - List<String> idsOfCoveredDiscFive = new ArrayList<String>(); + List<String> idsOfCoveredDiscFive = new ArrayList<>(); annotationFour.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscFive); Map<String, Discrepancy> discrepanciesArray = dispoItem.getDiscrepanciesList(); @@ -323,11 +323,11 @@ public class DispoConnectorTest { @Test public void testAllDiscrepanciesAnnotatedOneComplete() { - List<DispoAnnotationData> annotationsAsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsAsList = new ArrayList<>(); // Create one annotation with every discrepancy covered DispoAnnotationData annotationOne = new DispoAnnotationData(); annotationOne.setLocationRefs("1-5, 12-18, 20"); - List<String> idsOfCoveredDisc = new ArrayList<String>(); + List<String> idsOfCoveredDisc = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDisc); annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("OTHER"); @@ -349,7 +349,7 @@ public class DispoConnectorTest { annotationOne.setId(annotIdOne); annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("test"); - List<String> idsOfCoveredDiscOne = new ArrayList<String>(); + List<String> idsOfCoveredDiscOne = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscOne); annotationsAsList.add(annotationOne); @@ -358,7 +358,7 @@ public class DispoConnectorTest { annotationTwo.setId(annotIdTwo); annotationTwo.setIsResolutionValid(true); annotationTwo.setResolutionType("Req"); - List<String> idsOfCoveredDiscTwo = new ArrayList<String>(); + List<String> idsOfCoveredDiscTwo = new ArrayList<>(); annotationTwo.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscTwo); annotationsAsList.add(annotationTwo); @@ -367,11 +367,11 @@ public class DispoConnectorTest { annotationThree.setId(annotIdThree); annotationThree.setIsResolutionValid(true); annotationThree.setResolutionType("Undetermined"); - List<String> idsOfCoveredDiscThree = new ArrayList<String>(); + List<String> idsOfCoveredDiscThree = new ArrayList<>(); annotationThree.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscThree); annotationsAsList.add(annotationThree); - List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsList = new ArrayList<>(); dispoItem.setAnnotationsList(annotationsList); Map<String, Discrepancy> discrepanciesList = dispoItem.getDiscrepanciesList(); @@ -403,13 +403,13 @@ public class DispoConnectorTest { @Test public void testZComplexCase() { - List<DispoAnnotationData> annotationsList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> annotationsList = new ArrayList<>(); DispoAnnotationData annotationOne = new DispoAnnotationData(); annotationOne.setLocationRefs("5, 1-3"); annotationOne.setId(annotIdOne); annotationOne.setIsResolutionValid(true); annotationOne.setResolutionType("CODE"); - List<String> idsOfCoveredDiscOne = new ArrayList<String>(); + List<String> idsOfCoveredDiscOne = new ArrayList<>(); annotationOne.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscOne); DispoAnnotationData annotationTwo = new DispoAnnotationData(); @@ -417,13 +417,13 @@ public class DispoConnectorTest { annotationTwo.setId(annotIdTwo); annotationTwo.setIsResolutionValid(true); annotationTwo.setResolutionType("CODE"); - List<String> idsOfCoveredDiscTwo = new ArrayList<String>(); + List<String> idsOfCoveredDiscTwo = new ArrayList<>(); annotationTwo.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscTwo); DispoAnnotationData annotationThree = new DispoAnnotationData(); annotationThree.setLocationRefs("16, 20"); annotationThree.setId(annotIdThree); - List<String> idsOfCoveredDiscThree = new ArrayList<String>(); + List<String> idsOfCoveredDiscThree = new ArrayList<>(); annotationThree.setIsResolutionValid(true); annotationThree.setResolutionType("CODE"); annotationThree.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscThree); @@ -431,7 +431,7 @@ public class DispoConnectorTest { DispoAnnotationData annotationFour = new DispoAnnotationData(); annotationFour.setLocationRefs("4, 20"); annotationFour.setId(annotIdFour); - List<String> idsOfCoveredDiscFour = new ArrayList<String>(); + List<String> idsOfCoveredDiscFour = new ArrayList<>(); annotationFour.setIsResolutionValid(true); annotationFour.setResolutionType("CODE"); annotationFour.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscFour); @@ -439,7 +439,7 @@ public class DispoConnectorTest { DispoAnnotationData annotationFive = new DispoAnnotationData(); annotationFive.setLocationRefs("18, 16, 17, 4"); annotationFive.setId(annotIdFive); - List<String> idsOfCoveredDiscFive = new ArrayList<String>(); + List<String> idsOfCoveredDiscFive = new ArrayList<>(); annotationFive.setIsResolutionValid(true); annotationFive.setResolutionType("CODE"); annotationFive.setIdsOfCoveredDiscrepancies(idsOfCoveredDiscFive); 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 c252e56a57c..f933a53a20e 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 @@ -686,7 +686,7 @@ public class DispoApiImpl implements DispoApi { } private List<DispoAnnotationData> removeAnnotationFromList(List<DispoAnnotationData> oldList, int indexRemoved) { - List<DispoAnnotationData> newList = new ArrayList<DispoAnnotationData>(); + List<DispoAnnotationData> newList = new ArrayList<>(); oldList.remove(indexRemoved); // Re assign index to Annotations still left in list 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 608386002eb..81de4f1a7fb 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 @@ -179,7 +179,7 @@ public class DispoConnector { if (isAllLocRefValid) { annotation.setIsConnected(true); - annotation.setIdsOfCoveredDiscrepancies(new ArrayList<String>(workingIdsOfCovered)); + annotation.setIdsOfCoveredDiscrepancies(new ArrayList<>(workingIdsOfCovered)); } else { annotation.setIsConnected(false); } @@ -210,7 +210,7 @@ public class DispoConnector { if (isAllLocRefValid) { annotation.setIsConnected(true); - annotation.setIdsOfCoveredDiscrepancies(new ArrayList<String>(workingIdsOfCovered)); + annotation.setIdsOfCoveredDiscrepancies(new ArrayList<>(workingIdsOfCovered)); } else { annotation.setIsConnected(false); } diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/StorageProviderImpl.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/StorageProviderImpl.java index c5d940b1d5a..0ab1dc53936 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/StorageProviderImpl.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/StorageProviderImpl.java @@ -57,7 +57,7 @@ public class StorageProviderImpl extends LazyObject<Storage> implements StorageP } }; - return new FutureTask<Storage>(callable); + return new FutureTask<>(callable); } private Storage createStorage() throws Exception { diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DiscrepancyParser.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DiscrepancyParser.java index e19f254f50f..e89536f196c 100644 --- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DiscrepancyParser.java +++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/DiscrepancyParser.java @@ -69,7 +69,7 @@ public class DiscrepancyParser { location.setValue("0"); final StringBuilder textAppendable = new StringBuilder(); final MutableBoolean isFailure = new MutableBoolean(false); - final Map<String, Discrepancy> discrepancies = new HashMap<String, Discrepancy>(); + final Map<String, Discrepancy> discrepancies = new HashMap<>(); final MutableDate scriptRunDate = new MutableDate(); final MutableDate firstTestPointDate = new MutableDate(); final MutableString version = new MutableString(); 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 6978d793dee..f6203c66c4d 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 @@ -178,7 +178,7 @@ public class DispoItemDataCopier { String normalizedText = discrepancy.getText().replaceFirst(".*?\\.", ""); // Want to exclude Point number from text we match with Pair<Discrepancy, Boolean> newPair = - new Pair<Discrepancy, Boolean>(discrepancy, textToDiscrepancy.containsKey(normalizedText)); + 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/TmoImporter.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/TmoImporter.java index fab0c6fbd07..4a56a7d39ed 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 @@ -41,12 +41,9 @@ public class TmoImporter implements DispoImporterApi { private final DispoDataFactory dataFactory; private final ExecutorAdmin executor; - private final Log logger; - TmoImporter(DispoDataFactory dataFactory, ExecutorAdmin executor, Log logger) { this.dataFactory = dataFactory; this.executor = executor; - this.logger = logger; } @Override 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 615daf72e3e..26d64383421 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 @@ -454,7 +454,7 @@ public class LisFileParser implements DispoImporterApi { } private boolean findAndProcessResultFile(File resultsFile, String resultPath, OperationReport report) { - List<File> resultsDirs = new ArrayList<File>(); + List<File> resultsDirs = new ArrayList<>(); resultsDirs.add(new File(vCastDir + File.separator + RESULTS)); resultsDirs.add(new File(vCastDir + File.separator + RESULTS + File.separator + IMPORTED_RESULTS)); @@ -618,7 +618,7 @@ public class LisFileParser implements DispoImporterApi { int sizeDelta = bitsUsedArray.length - bitsTrueArray.length; int highestChar = 63 + bitsUsedArray.length; for (int i = 1; i <= sizeDelta; i++) { - char c = (char) (highestChar--); + char c = (char) highestChar--; String key = Character.toString(c); toReturn.put(key, false); } @@ -626,7 +626,7 @@ public class LisFileParser implements DispoImporterApi { for (int i = 0; i < bitsTrueArray.length; i++) { char valueC = bitsTrueArray[i]; if (i != totalResultIndex) { - char c = (char) (highestChar--); + char c = (char) highestChar--; String key = Character.toString(c); toReturn.put(key, valueC == '1'); } else { 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 0a42caa0357..5c011f3a5b6 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 @@ -168,7 +168,7 @@ public class ExportSet { int total = coveredOverTotal.getSecond(); row2[1] = String.valueOf(covered); row2[2] = String.valueOf(total); - Double percent = (((double) covered / total) * 100); + Double percent = (double) covered / total * 100; row2[3] = String.format("%2.2f%%", percent); sheetWriter.writeRow(row2); } @@ -285,12 +285,12 @@ public class ExportSet { coveredCount = 0; } if (coveredOverTotal == null) { - Pair<Integer, Integer> newCount = new Pair<Integer, Integer>(coveredCount, 1); + Pair<Integer, Integer> newCount = new Pair<>(coveredCount, 1); unitToCovered.put(unit, newCount); } else { Integer currentCovered = coveredOverTotal.getFirst(); Integer currentTotal = coveredOverTotal.getSecond(); - Pair<Integer, Integer> newCount = new Pair<Integer, Integer>(currentCovered + coveredCount, ++currentTotal); + Pair<Integer, Integer> newCount = new Pair<>(currentCovered + coveredCount, ++currentTotal); unitToCovered.put(unit, newCount); } } 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 0b0824f033e..b8f3158f335 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 @@ -258,13 +258,12 @@ public final class DispoUtil { public static HashMap<String, String> splitTestScriptNameAndPath(List<DispoAnnotationData> annotations) { HashMap<String, String> testScriptNameToPath = new HashMap<>(); for (DispoAnnotationData data : annotations) { - String name = "", path = "", comment = ""; + String name = "", path = ""; String resolution = data.getResolution(); if (!resolution.isEmpty()) { String[] split = resolution.split("___"); if (split.length > 1) { path = split[0]; - comment = split[1]; } else { path = split.toString(); } diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/LoginDialog.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/LoginDialog.java index 603defa4b75..5df92c550f3 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/LoginDialog.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/LoginDialog.java @@ -100,7 +100,7 @@ public class LoginDialog extends TitleAreaDialog { * */ protected void validate() { - if ((this.userName.getText() != null) && !this.userName.getText().isEmpty() && (this.pwd.getText() != null) && !this.pwd.getText().isEmpty()) { + if (this.userName.getText() != null && !this.userName.getText().isEmpty() && this.pwd.getText() != null && !this.pwd.getText().isEmpty()) { getButton(IDialogConstants.OK_ID).setEnabled(true); } else { getButton(IDialogConstants.OK_ID).setEnabled(false); diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/QueryReader.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/QueryReader.java index 2f96870d455..3f17e8a3829 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/QueryReader.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/QueryReader.java @@ -71,7 +71,7 @@ public class QueryReader implements IDoorsArtifactParser { for (int j = 0; j < childNodes.getLength(); j++) { Node item = childNodes.item(j); - if ((item.getLocalName() != null) && item.getLocalName().equalsIgnoreCase("title")) { + if (item.getLocalName() != null && item.getLocalName().equalsIgnoreCase("title")) { NodeList childNodes2 = item.getChildNodes(); for (int k = 0; k < childNodes2.getLength(); k++) { Node item2 = childNodes2.item(k); diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ReqReader.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ReqReader.java index 5ec37980633..f396155c1eb 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ReqReader.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ReqReader.java @@ -76,7 +76,7 @@ public class ReqReader implements IDoorsArtifactParser { NodeList childNodes = node.getChildNodes(); for (int j = 0; j < childNodes.getLength(); j++) { Node item = childNodes.item(j); - if ((item.getLocalName() != null) && item.getLocalName().equalsIgnoreCase("shortTitle")) { + if (item.getLocalName() != null && item.getLocalName().equalsIgnoreCase("shortTitle")) { NodeList childNodes2 = item.getChildNodes(); Node item2 = childNodes2.item(0); toReturn = item2.getTextContent(); diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ServiceProviderCatalogReader.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ServiceProviderCatalogReader.java index a79b5c2ad45..d33573052a0 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ServiceProviderCatalogReader.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ServiceProviderCatalogReader.java @@ -65,7 +65,7 @@ public class ServiceProviderCatalogReader implements IDoorsArtifactParser { } for (int j = 0; j < childNodes.getLength(); j++) { Node item = childNodes.item(j); - if (item != null && (item.getLocalName() != null) && item.getLocalName().equalsIgnoreCase("title")) { + if (item != null && item.getLocalName() != null && item.getLocalName().equalsIgnoreCase("title")) { ServiceProviderCatalog child = new ServiceProviderCatalog(); child.setName(item.getTextContent()); child.setPath(cleanedPath); @@ -96,7 +96,7 @@ public class ServiceProviderCatalogReader implements IDoorsArtifactParser { } for (int j = 0; j < childNodes.getLength(); j++) { Node item = childNodes.item(j); - if (item != null && (item.getLocalName() != null) && item.getLocalName().equalsIgnoreCase("title")) { + if (item != null && item.getLocalName() != null && item.getLocalName().equalsIgnoreCase("title")) { ServiceProvider child = new ServiceProvider(); child.setName(item.getTextContent()); child.setPath(cleanedPath); diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ServiceProviderReader.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ServiceProviderReader.java index 403d20e5fb9..061f676eff5 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ServiceProviderReader.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/ServiceProviderReader.java @@ -52,7 +52,7 @@ public class ServiceProviderReader implements IDoorsArtifactParser { NodeList childNodes = node.getChildNodes(); for (int j = 0; j < childNodes.getLength(); j++) { Node item = childNodes.item(j); - if ((item.getLocalName() != null) && item.getLocalName().equalsIgnoreCase("label")) { + if (item.getLocalName() != null && item.getLocalName().equalsIgnoreCase("label")) { provider.setName(item.getTextContent()); } } diff --git a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/oauth/DWAOAuthService.java b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/oauth/DWAOAuthService.java index fadd70bcc93..ac2da4c6f48 100644 --- a/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/oauth/DWAOAuthService.java +++ b/plugins/org.eclipse.osee.doors.connector.core/src/org/eclipse/osee/doors/connector/core/oauth/DWAOAuthService.java @@ -156,7 +156,7 @@ public class DWAOAuthService { Token accessToken = null; try { - if ((accessTokenRequestResponse != 200)) { + if (accessTokenRequestResponse != 200) { return null; } OseeLog.log(DWAOAuthService.class, Level.INFO, "Response: " + accessTokenRequestResponse); @@ -289,7 +289,7 @@ public class DWAOAuthService { authorizeGetMethod.addRequestHeader("OSLC-Core-Version", "2.0"); authorizeGetMethod.addRequestHeader("Accept", "application/rdf+xml"); authorizeGetMethod.addRequestHeader("Accept-Charset", "UTF-8"); - if ((queryString != null) && !queryString.isEmpty()) { + if (queryString != null && !queryString.isEmpty()) { try { authorizeGetMethod.setQueryString(URIUtil.encodeQuery(queryString)); } catch (URIException e) { @@ -298,11 +298,8 @@ public class DWAOAuthService { } signRequest(accessToken, authorizeGetMethod, true); String responseBodyAsString = ""; - @SuppressWarnings("unused") - int accessTokenRequestResponse = -1; - try { - accessTokenRequestResponse = this.httpClient.executeMethod(authorizeGetMethod); + this.httpClient.executeMethod(authorizeGetMethod); responseBodyAsString = authorizeGetMethod.getResponseBodyAsString(); } catch (IOException e) { OseeLog.log(getClass(), Level.SEVERE, e); diff --git a/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/perspectives/Doors.java b/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/perspectives/Doors.java index e8a8cad3223..46f5f5af585 100644 --- a/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/perspectives/Doors.java +++ b/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/perspectives/Doors.java @@ -87,10 +87,10 @@ public class Doors extends ViewPart { reqName = string2; } } - if ((url != null) && (reqName != null)) { + if (url != null && reqName != null) { BranchSelectionDialog bsd = new BranchSelectionDialog("Select a branch to Import the Doors requirement(s)", true); - if ((bsd.open() == Window.OK) && (bsd.getSelection() != null)) { + if (bsd.open() == Window.OK && bsd.getSelection() != null) { DoorsCreator doorTypesCreator = new DoorsCreator(); @@ -133,7 +133,7 @@ public class Doors extends ViewPart { String[] hostName = split2[1].split(":"); Browser.setCookie("JSESSIONID=" + jSessionID + "; domain=" + hostName[0] + "; path=/", DoorsModel.getDialogUrl()); - if (!this.browser.isDisposed() && (this.fileName != null)) { + if (!this.browser.isDisposed() && this.fileName != null) { File file = new File(this.fileName); setBrowserUrl(file); } else { diff --git a/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/viewer/RdfExplorerDragAndDrop.java b/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/viewer/RdfExplorerDragAndDrop.java index f291d75b9b0..3485d03b02b 100644 --- a/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/viewer/RdfExplorerDragAndDrop.java +++ b/plugins/org.eclipse.osee.doors.connector.ui/src/org/eclipse/osee/doors/connector/ui/viewer/RdfExplorerDragAndDrop.java @@ -34,7 +34,7 @@ import org.eclipse.swt.widgets.Control; public class RdfExplorerDragAndDrop { private DragSource dragSource; - private final List<Requirement> reqs = new ArrayList<Requirement>(); + private final List<Requirement> reqs = new ArrayList<>(); public RdfExplorerDragAndDrop(Control source) { @@ -72,7 +72,7 @@ public class RdfExplorerDragAndDrop { } public void textTransferDragSetData(DragSourceEvent event) { - List<JsonArtifactRepresentation> reqsOut = new ArrayList<JsonArtifactRepresentation>(); + List<JsonArtifactRepresentation> reqsOut = new ArrayList<>(); for (Requirement reqt : reqs) { reqsOut.add(makeJsonArtifactRepresentation(reqt)); } @@ -88,7 +88,7 @@ public class RdfExplorerDragAndDrop { JsonArtifactRepresentation artRep = new JsonArtifactRepresentation(); artRep.setArtifactTypeId(CoreArtifactTypes.Url.getId()); artRep.setName(reqt.getShortName()); - List<JsonAttributeRepresentation> attrs = new ArrayList<JsonAttributeRepresentation>(); + List<JsonAttributeRepresentation> attrs = new ArrayList<>(); attrs.add(new JsonAttributeRepresentation(CoreAttributeTypes.Description.getId(), reqt.getName())); attrs.add(new JsonAttributeRepresentation(CoreAttributeTypes.ContentUrl.getId(), reqt.getPath())); artRep.setAttrs(attrs); diff --git a/plugins/org.eclipse.osee.event.osgi/src/org/eclipse/osee/event/osgi/internal/EventHandlerConsumer.java b/plugins/org.eclipse.osee.event.osgi/src/org/eclipse/osee/event/osgi/internal/EventHandlerConsumer.java index 9b95dfc7e5b..bb941ed02b8 100644 --- a/plugins/org.eclipse.osee.event.osgi/src/org/eclipse/osee/event/osgi/internal/EventHandlerConsumer.java +++ b/plugins/org.eclipse.osee.event.osgi/src/org/eclipse/osee/event/osgi/internal/EventHandlerConsumer.java @@ -25,10 +25,10 @@ import org.osgi.framework.ServiceRegistration; public class EventHandlerConsumer { private final Map<EventHandler, ServiceRegistration<?>> registered = - new ConcurrentHashMap<EventHandler, ServiceRegistration<?>>(); + new ConcurrentHashMap<>(); private final Map<EventHandler, Dictionary<String, ?>> pending = - new ConcurrentHashMap<EventHandler, Dictionary<String, ?>>(); + new ConcurrentHashMap<>(); private BundleContext context; private Thread thread; diff --git a/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessModel.java b/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessModel.java index f5607dc3591..2f071757063 100644 --- a/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessModel.java +++ b/plugins/org.eclipse.osee.framework.access.provider/src/org/eclipse/osee/framework/access/provider/internal/FrameworkAccessModel.java @@ -37,7 +37,7 @@ public class FrameworkAccessModel extends OseeDslAccessModel { public void computeAccess(IAccessContextId contextId, Collection<Object> objectsToCheck, AccessData accessData) { if (contextId.equals(DefaultFrameworkAccessConstants.INVALID_ASSOC_ART_ID)) { for (Object obj : objectsToCheck) { - AccessDetail<Object> data = new AccessDetail<Object>(obj, PermissionEnum.READ, Scope.createLegacyScope(), + AccessDetail<Object> data = new AccessDetail<>(obj, PermissionEnum.READ, Scope.createLegacyScope(), "Invalid artifact Id associated with branch"); accessData.add(obj, data); addRelationAccess(obj, accessData); @@ -51,7 +51,7 @@ public class FrameworkAccessModel extends OseeDslAccessModel { if (object instanceof Artifact) { for (RelationType relationType : ((Artifact) object).getValidRelationTypes()) { for (RelationSide relationSide : RelationSide.values()) { - accessData.add(object, new AccessDetail<RelationTypeSide>( + accessData.add(object, new AccessDetail<>( new RelationTypeSide(relationType, relationSide), PermissionEnum.READ, Scope.createLegacyScope())); } } diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java index e0792d6b312..bba261f6039 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlService.java @@ -377,7 +377,7 @@ public class AccessControlService implements IAccessControlService { PermissionEnum userPermission = null; AccessObject accessObject = BranchAccessObject.getBranchAccessObjectFromCache(branch); - if (accessObject == null && (branch.notEqual(COMMON) && BranchManager.getType(branch).isBaselineBranch())) { + if (accessObject == null && branch.notEqual(COMMON) && BranchManager.getType(branch).isBaselineBranch()) { userPermission = PermissionEnum.READ; } else if (accessObject == null) { userPermission = PermissionEnum.FULLACCESS; @@ -626,7 +626,7 @@ public class AccessControlService implements IAccessControlService { AccessTopicEventPayload event = new AccessTopicEventPayload(); event.setBranch(accessControlledObject.getBranch()); if (isArtifact) { - event.addArtifact(((ArtifactAccessObject) accessControlledObject)); + event.addArtifact((ArtifactAccessObject) accessControlledObject); } OseeEventManager.kickAccessTopicEvent(this, event, AccessTopicEvent.ACCESS_ARTIFACT_MODIFIED); diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java index d7f93f8be20..77d7982e60c 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/AccessControlServiceProxy.java @@ -39,10 +39,10 @@ import org.osgi.framework.ServiceReference; public final class AccessControlServiceProxy implements IAccessControlService { private final List<ServiceReference<IAccessProvider>> registered = - new CopyOnWriteArrayList<ServiceReference<IAccessProvider>>(); + new CopyOnWriteArrayList<>(); private final List<ServiceReference<IAccessProvider>> pendingProviders = - new CopyOnWriteArrayList<ServiceReference<IAccessProvider>>(); + new CopyOnWriteArrayList<>(); private JdbcService jdbcService; private IOseeCachingService cachingService; diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java index e20df6712d1..946b2f5ccef 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/ObjectAccessProviderProxy.java @@ -97,7 +97,7 @@ public final class ObjectAccessProviderProxy implements IAccessProvider { private void setBranchAccessData(ArtifactToken userArtifact, BranchId branch, AccessData accessData) { String reason = "Legacy Branch Permission"; PermissionEnum userPermission = getAccessService().getBranchPermission(userArtifact, branch); - accessData.add(branch, new AccessDetail<BranchId>(branch, userPermission, Scope.createLegacyScope(), reason)); + accessData.add(branch, new AccessDetail<>(branch, userPermission, Scope.createLegacyScope(), reason)); } } diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java index 37b8a9c3ea5..6637fc4950c 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProvider.java @@ -38,7 +38,7 @@ public class CmAccessProvider implements IAccessProvider { @Override public void computeAccess(ArtifactToken userArtifact, Collection<?> objToChecks, AccessData accessData) { DoubleKeyHashMap<CmAccessControl, IAccessContextId, Collection<Object>> cmToCheckObjects = - new DoubleKeyHashMap<CmAccessControl, IAccessContextId, Collection<Object>>(); + new DoubleKeyHashMap<>(); for (Object objectToCheck : objToChecks) { CmAccessControl management = provider.getService(userArtifact, objectToCheck); diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java index 5821a4d2fc3..e4a5d69dabb 100644 --- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java +++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/CmAccessProviderProxy.java @@ -35,7 +35,7 @@ import org.osgi.framework.ServiceReference; public final class CmAccessProviderProxy implements IAccessProvider { private final List<ServiceReference<CmAccessControl>> pending = - new CopyOnWriteArrayList<ServiceReference<CmAccessControl>>(); + new CopyOnWriteArrayList<>(); private final Collection<CmAccessControl> cmServices = new CopyOnWriteArraySet<>(); diff --git a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpGetMethod.java b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpGetMethod.java index 5573bf480e4..fe42642ba41 100644 --- a/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpGetMethod.java +++ b/plugins/org.eclipse.osee.framework.core.client/src/org/eclipse/osee/framework/core/client/server/HttpGetMethod.java @@ -27,7 +27,7 @@ final class HttpGetMethod implements IHttpMethod { public void processRequest(HttpRequest httpRequest, HttpResponse httpResponse) { String requestType = httpRequest.getUrlRequest(); if (extensionObjects == null) { - extensionObjects = new ExtensionDefinedObjects<IHttpServerRequest>( + extensionObjects = new ExtensionDefinedObjects<>( "org.eclipse.osee.framework.skynet.core.HttpServerRequest", "IHttpServerRequest", "classname"); } List<IHttpServerRequest> httpServerRequests = extensionObjects.getObjects(); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModelTest.java b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModelTest.java index 06a217d97b5..ecd4e89833c 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModelTest.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration.test/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModelTest.java @@ -47,7 +47,7 @@ public class OseeDslAccessModelTest { @Test(expected = OseeArgumentException.class) public void testComputeAccessNullAgumentCheck1() { AccessModel accessModel = new OseeDslAccessModel(null, null); - accessModel.computeAccess(null, new ArrayList<Object>(), new AccessData()); + accessModel.computeAccess(null, new ArrayList<>(), new AccessData()); } @Test(expected = OseeArgumentException.class) @@ -85,9 +85,9 @@ public class OseeDslAccessModelTest { Scope detail1Scope = new Scope().add("fail"); Scope detail2Scope = new Scope().add("fail"); final AccessDetail<?> detail1 = - new AccessDetail<Object>(checkedObject, PermissionEnum.READ, detail1Scope, "detail 1"); + new AccessDetail<>(checkedObject, PermissionEnum.READ, detail1Scope, "detail 1"); final AccessDetail<?> detail2 = - new AccessDetail<Object>(checkedObject, PermissionEnum.WRITE, detail2Scope, "detail 2"); + new AccessDetail<>(checkedObject, PermissionEnum.WRITE, detail2Scope, "detail 2"); final AccessData accessData = new AccessData(); diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchRestrictionHandler.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchRestrictionHandler.java index 0fbf3058add..7801d62254e 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchRestrictionHandler.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/ArtifactMatchRestrictionHandler.java @@ -48,7 +48,7 @@ public class ArtifactMatchRestrictionHandler implements RestrictionHandler<Artif XArtifactMatcher artifactMatcher = restriction.getArtifactMatcherRef(); if (matcherInterpreter.matches(artifactMatcher, artifactProxy)) { PermissionEnum permission = OseeUtil.getPermission(restriction); - collector.collect(new AccessDetail<ArtifactToken>(artifactProxy.getObject(), permission, scope)); + collector.collect(new AccessDetail<>(artifactProxy.getObject(), permission, scope)); } } } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandler.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandler.java index 27296391d9c..95f58f7e7e1 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandler.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AttributeTypeRestrictionHandler.java @@ -57,7 +57,7 @@ public class AttributeTypeRestrictionHandler implements RestrictionHandler<Attri if (isApplicable) { PermissionEnum permission = OseeUtil.getPermission(restriction); - collector.collect(new AccessDetail<AttributeTypeId>(attributeTypeToMatch, permission, scopeLevel)); + collector.collect(new AccessDetail<>(attributeTypeToMatch, permission, scopeLevel)); } } } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandler.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandler.java index 45e8c6735e5..5ace4ff31c4 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandler.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/RelationTypeRestrictionHandler.java @@ -92,7 +92,7 @@ public class RelationTypeRestrictionHandler implements RestrictionHandler<Relati for (RelationType relationType : relationTypes) { for (RelationSide relationSide : RelationSide.values()) { if (OseeUtil.isRestrictedSide(restrictedSide, relationSide)) { - collector.collect(new AccessDetail<RelationTypeSide>(new RelationTypeSide(relationType, relationSide), + collector.collect(new AccessDetail<>(new RelationTypeSide(relationType, relationSide), permission, toUse)); } } diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/AbstractOseeDslProvider.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/AbstractOseeDslProvider.java index 5166ab3a6ae..8134f479139 100644 --- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/AbstractOseeDslProvider.java +++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/AbstractOseeDslProvider.java @@ -80,7 +80,7 @@ public abstract class AbstractOseeDslProvider implements OseeDslProvider { @Override public Map<String, Long> getContextGuidToIdMap() { if (accessGuidToId == null) { - accessGuidToId = new ConcurrentHashMap<String, Long>(); + accessGuidToId = new ConcurrentHashMap<>(); Artifact mapArt = ArtifactQuery.getArtifactFromToken(CoreArtifactTokens.AccessIdMap); if (mapArt.isValid()) { String mapStr = mapArt.getSoleAttributeValue(CoreAttributeTypes.GeneralStringData); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataQueryTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataQueryTest.java index e6afeac868c..0dda899b754 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataQueryTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/access/AccessDataQueryTest.java @@ -87,8 +87,8 @@ public class AccessDataQueryTest { AttributeTypeId attributeType = CoreAttributeTypes.ParagraphNumber; AttributeTypeId wordAttributeType = CoreAttributeTypes.WordTemplateContent; - data.add(artifactToCheck, new AccessDetail<AttributeTypeId>(attributeType, PermissionEnum.WRITE, new Scope())); - data.add(artifactToCheck, new AccessDetail<AttributeTypeId>(wordAttributeType, PermissionEnum.READ, new Scope())); + data.add(artifactToCheck, new AccessDetail<>(attributeType, PermissionEnum.WRITE, new Scope())); + data.add(artifactToCheck, new AccessDetail<>(wordAttributeType, PermissionEnum.READ, new Scope())); AccessDataQuery query = new AccessDataQuery(data); PermissionStatus status = new PermissionStatus(); @@ -133,8 +133,8 @@ public class AccessDataQueryTest { BranchId common = CoreBranches.COMMON; BranchId branch = CoreBranches.SYSTEM_ROOT; - data.add(common, new AccessDetail<BranchId>(common, PermissionEnum.READ, new Scope())); - data.add(branch, new AccessDetail<BranchId>(branch, PermissionEnum.WRITE, new Scope())); + data.add(common, new AccessDetail<>(common, PermissionEnum.READ, new Scope())); + data.add(branch, new AccessDetail<>(branch, PermissionEnum.WRITE, new Scope())); AccessDataQuery query = new AccessDataQuery(data); @@ -185,7 +185,7 @@ public class AccessDataQueryTest { data.add(branchToCheck, new AccessDetail<BranchId>(branchToCheck, PermissionEnum.WRITE, new Scope())); data.add(artifactToCheck, new AccessDetail<>(artifactToCheck, PermissionEnum.WRITE, new Scope())); - data.add(artifactToCheck, new AccessDetail<IArtifactType>(artifactType, PermissionEnum.WRITE, new Scope())); + data.add(artifactToCheck, new AccessDetail<>(artifactType, PermissionEnum.WRITE, new Scope())); return new TestObject(artifactToCheck, data); } diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/change/ChangeItemUtilTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/change/ChangeItemUtilTest.java index f4939fe48ce..102bb9438e3 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/change/ChangeItemUtilTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/change/ChangeItemUtilTest.java @@ -269,7 +269,7 @@ public class ChangeItemUtilTest { @Test public void testGammasEqual() { List<Triplet<ChangeVersion, ChangeVersion, Boolean>> cases = - new ArrayList<Triplet<ChangeVersion, ChangeVersion, Boolean>>(); + new ArrayList<>(); cases.add(createTriplet(3000L, ModificationType.MODIFIED, 3000L, ModificationType.NEW, true)); cases.add(createTriplet(0L, ModificationType.MODIFIED, 3000L, ModificationType.NEW, false)); @@ -432,7 +432,7 @@ public class ChangeItemUtilTest { } private Triplet<ChangeVersion, ChangeVersion, Boolean> createTriplet(Long long1, ModificationType mod1, Long long2, ModificationType mod2, boolean expected) { - return new Triplet<ChangeVersion, ChangeVersion, Boolean>(// + return new Triplet<>(// ChangeTestUtility.createChange(long1, mod1), // ChangeTestUtility.createChange(long2, mod2), // expected); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BaseOseeFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BaseOseeFieldTest.java index 6f5337252fe..4247540b654 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BaseOseeFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/BaseOseeFieldTest.java @@ -77,7 +77,7 @@ public abstract class BaseOseeFieldTest { Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {// - new OseeFieldTestData<Object>(new OseeField<Object>(), // + new OseeFieldTestData<>(new OseeField<>(), // null, false, // new FieldGetSetTestData<Object>(true, "one test", "one test", true), // new FieldGetSetTestData<Object>(false, "two test", "two test", true), // @@ -85,32 +85,32 @@ public abstract class BaseOseeFieldTest { )});// data.add(new Object[] { // - new OseeFieldTestData<Integer>(new OseeField<Integer>(), // + new OseeFieldTestData<>(new OseeField<Integer>(), // null, false, // - new FieldGetSetTestData<Integer>(true, 1, 1, true), // - new FieldGetSetTestData<Integer>(false, 5, 5, true), // - new FieldGetSetTestData<Integer>(true, Integer.MIN_VALUE, Integer.MIN_VALUE, true)// + new FieldGetSetTestData<>(true, 1, 1, true), // + new FieldGetSetTestData<>(false, 5, 5, true), // + new FieldGetSetTestData<>(true, Integer.MIN_VALUE, Integer.MIN_VALUE, true)// )}); data.add(new Object[] { // - new OseeFieldTestData<Boolean>(new OseeField<Boolean>(), // + new OseeFieldTestData<>(new OseeField<Boolean>(), // null, false, // - new FieldGetSetTestData<Boolean>(true, true, true, true), // - new FieldGetSetTestData<Boolean>(false, true, true, true), // - new FieldGetSetTestData<Boolean>(true, false, false, true), // - new FieldGetSetTestData<Boolean>(false, false, false, true)// + new FieldGetSetTestData<>(true, true, true, true), // + new FieldGetSetTestData<>(false, true, true, true), // + new FieldGetSetTestData<>(true, false, false, true), // + new FieldGetSetTestData<>(false, false, false, true)// )}); - data.add(new Object[] {new OseeFieldTestData<Object>(new OseeField<Object>("string1"), "string1", true)}); + data.add(new Object[] {new OseeFieldTestData<>(new OseeField<Object>("string1"), "string1", true)}); data.add(new Object[] { - new OseeFieldTestData<Integer>(new OseeField<Integer>(Integer.MIN_VALUE), Integer.MIN_VALUE, true)}); - data.add(new Object[] {new OseeFieldTestData<Boolean>(new OseeField<Boolean>(true), true, true)}); - data.add(new Object[] {new OseeFieldTestData<Boolean>(new OseeField<Boolean>(false), false, true)}); + new OseeFieldTestData<>(new OseeField<>(Integer.MIN_VALUE), Integer.MIN_VALUE, true)}); + data.add(new Object[] {new OseeFieldTestData<>(new OseeField<>(true), true, true)}); + data.add(new Object[] {new OseeFieldTestData<>(new OseeField<>(false), false, true)}); data.add(new Object[] {// - new OseeFieldTestData<String>(new OseeField<String>("string2"), "string2", true, // - new FieldGetSetTestData<String>(false, "another", "another", true), // - new FieldGetSetTestData<String>(true, "something", "something", true)// + new OseeFieldTestData<>(new OseeField<>("string2"), "string2", true, // + new FieldGetSetTestData<>(false, "another", "another", true), // + new FieldGetSetTestData<>(true, "something", "something", true)// )}); // IOseeTypeFactory factory = new OseeTypeFactory(); diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldMainTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldMainTest.java index d713b3d436d..f9fa5a81757 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldMainTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/OseeFieldMainTest.java @@ -80,7 +80,7 @@ public class OseeFieldMainTest { Collection<Object[]> data = new ArrayList<>(); data.add(new Object[] {// - new OseeFieldTestData<Object>(new OseeField<Object>(), // + new OseeFieldTestData<>(new OseeField<>(), // null, false, // new FieldGetSetTestData<Object>(true, "one test", "one test", true), // new FieldGetSetTestData<Object>(false, "two test", "two test", true), // @@ -88,32 +88,32 @@ public class OseeFieldMainTest { )});// data.add(new Object[] { // - new OseeFieldTestData<Integer>(new OseeField<Integer>(), // + new OseeFieldTestData<>(new OseeField<Integer>(), // null, false, // - new FieldGetSetTestData<Integer>(true, 1, 1, true), // - new FieldGetSetTestData<Integer>(false, 5, 5, true), // - new FieldGetSetTestData<Integer>(true, Integer.MIN_VALUE, Integer.MIN_VALUE, true)// + new FieldGetSetTestData<>(true, 1, 1, true), // + new FieldGetSetTestData<>(false, 5, 5, true), // + new FieldGetSetTestData<>(true, Integer.MIN_VALUE, Integer.MIN_VALUE, true)// )}); data.add(new Object[] { // - new OseeFieldTestData<Boolean>(new OseeField<Boolean>(), // + new OseeFieldTestData<>(new OseeField<Boolean>(), // null, false, // - new FieldGetSetTestData<Boolean>(true, true, true, true), // - new FieldGetSetTestData<Boolean>(false, true, true, true), // - new FieldGetSetTestData<Boolean>(true, false, false, true), // - new FieldGetSetTestData<Boolean>(false, false, false, true)// + new FieldGetSetTestData<>(true, true, true, true), // + new FieldGetSetTestData<>(false, true, true, true), // + new FieldGetSetTestData<>(true, false, false, true), // + new FieldGetSetTestData<>(false, false, false, true)// )}); - data.add(new Object[] {new OseeFieldTestData<Object>(new OseeField<Object>("string1"), "string1", true)}); + data.add(new Object[] {new OseeFieldTestData<>(new OseeField<Object>("string1"), "string1", true)}); data.add(new Object[] { - new OseeFieldTestData<Integer>(new OseeField<Integer>(Integer.MIN_VALUE), Integer.MIN_VALUE, true)}); - data.add(new Object[] {new OseeFieldTestData<Boolean>(new OseeField<Boolean>(true), true, true)}); - data.add(new Object[] {new OseeFieldTestData<Boolean>(new OseeField<Boolean>(false), false, true)}); + new OseeFieldTestData<>(new OseeField<>(Integer.MIN_VALUE), Integer.MIN_VALUE, true)}); + data.add(new Object[] {new OseeFieldTestData<>(new OseeField<>(true), true, true)}); + data.add(new Object[] {new OseeFieldTestData<>(new OseeField<>(false), false, true)}); data.add(new Object[] {// - new OseeFieldTestData<String>(new OseeField<String>("string2"), "string2", true, // - new FieldGetSetTestData<String>(false, "another", "another", true), // - new FieldGetSetTestData<String>(true, "something", "something", true)// + new OseeFieldTestData<>(new OseeField<>("string2"), "string2", true, // + new FieldGetSetTestData<>(false, "another", "another", true), // + new FieldGetSetTestData<>(true, "something", "something", true)// )}); return data; } diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/UniqueIdFieldTest.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/UniqueIdFieldTest.java index 81ebbbff955..90d3e536c4b 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/UniqueIdFieldTest.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/fields/UniqueIdFieldTest.java @@ -38,13 +38,13 @@ public class UniqueIdFieldTest extends BaseOseeFieldTest { @Parameters public static Collection<Object[]> data() { Collection<Object[]> data = new ArrayList<>(); - data.add(new Object[] {new OseeFieldTestData<Long>(new UniqueIdField(), // + data.add(new Object[] {new OseeFieldTestData<>(new UniqueIdField(), // Id.SENTINEL, true, // - new FieldGetSetTestData<Long>(false, Id.SENTINEL, Id.SENTINEL, true), // - new FieldGetSetTestData<Long>(true, Id.SENTINEL, Id.SENTINEL, false), // - new FieldGetSetTestData<Long>(false, 100L, 100L, true), // - new FieldGetSetTestData<Long>(false, 200L, 100L, true, OseeStateException.class), // - new FieldGetSetTestData<Long>(true, 300L, 100L, false, OseeStateException.class)// + new FieldGetSetTestData<>(false, Id.SENTINEL, Id.SENTINEL, true), // + new FieldGetSetTestData<>(true, Id.SENTINEL, Id.SENTINEL, false), // + new FieldGetSetTestData<>(false, 100L, 100L, true), // + new FieldGetSetTestData<>(false, 200L, 100L, true, OseeStateException.class), // + new FieldGetSetTestData<>(true, 300L, 100L, false, OseeStateException.class)// )}); return data; } diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java index 73ab421a952..98d4df13fc6 100644 --- a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockDataFactory.java @@ -53,9 +53,9 @@ public final class MockDataFactory { public static <T> AccessDetail<T> createAccessDetails(T expAccessObject, PermissionEnum expPermission, String expReason, Scope scope) { AccessDetail<T> target; if (expReason != null) { - target = new AccessDetail<T>(expAccessObject, expPermission, scope, expReason); + target = new AccessDetail<>(expAccessObject, expPermission, scope, expReason); } else { - target = new AccessDetail<T>(expAccessObject, expPermission, scope); + target = new AccessDetail<>(expAccessObject, expPermission, scope); } return target; } diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/AbstractOseeType.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/AbstractOseeType.java index fd33cceb87a..6bbdea739bf 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/AbstractOseeType.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/AbstractOseeType.java @@ -35,7 +35,7 @@ public abstract class AbstractOseeType extends NamedIdBase implements IOseeStora protected AbstractOseeType(Long id, String name) { super(id, name); addField(UNIQUE_ID_FIELD_KEY, new UniqueIdField()); - addField(NAME_FIELD_KEY, new OseeField<String>(name)); + addField(NAME_FIELD_KEY, new OseeField<>(name)); } protected synchronized void addField(String key, AbstractOseeField<?> toAdd) { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/OseeEnumEntry.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/OseeEnumEntry.java index 47bf7d6f3e0..745c2d22e04 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/OseeEnumEntry.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/OseeEnumEntry.java @@ -51,7 +51,7 @@ public class OseeEnumEntry implements FullyNamed, HasDescription { } public Pair<String, Integer> asPair() { - return new Pair<String, Integer>(getName(), ordinal()); + return new Pair<>(getName(), ordinal()); } @Override diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessData.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessData.java index 2ddb610f8e9..2c858b9f9c3 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessData.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/access/AccessData.java @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; public final class AccessData { private final CompositeKeyHashMap<Object, Object, AccessDetail<?>> accessMap = - new CompositeKeyHashMap<Object, Object, AccessDetail<?>>(); + new CompositeKeyHashMap<>(); public AccessData() { super(); diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java index 5e3598ff877..c14cbb2211a 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/cache/AbstractOseeCache.java @@ -110,7 +110,7 @@ public abstract class AbstractOseeCache<T extends NamedIdBase> implements IOseeC @Override public Collection<T> getAll() { ensurePopulated(); - return new ArrayList<T>(idToTypeMap.values()); + return new ArrayList<>(idToTypeMap.values()); } @Override diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java index e80311c844f..9654d5d6d36 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/internal/fields/ArtifactTypeAttributesField.java @@ -35,7 +35,7 @@ public final class ArtifactTypeAttributesField extends AbstractOseeField<Map<Bra @Override public Map<BranchId, Collection<AttributeType>> get() { - return new HashMap<BranchId, Collection<AttributeType>>(validityMap); + return new HashMap<>(validityMap); } public void put(BranchId branch, Collection<AttributeType> attributes) { diff --git a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java index cc61c1b653d..05309be5f0f 100644 --- a/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java +++ b/plugins/org.eclipse.osee.framework.core.model/src/org/eclipse/osee/framework/core/model/type/ArtifactType.java @@ -40,7 +40,7 @@ public class ArtifactType extends AbstractOseeIdType implements IArtifactType { private final Set<ArtifactType> superTypes = new HashSet<>(); private final Set<ArtifactType> childTypes = new HashSet<>(); private final Map<BranchId, Collection<AttributeType>> attributes = - new HashMap<BranchId, Collection<AttributeType>>(); + new HashMap<>(); public ArtifactType(Long guid, String name, boolean isAbstract) { super(guid, name); diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/AuthenticationManager.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/AuthenticationManager.java index 832324e0b5d..ea9f5c017de 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/AuthenticationManager.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/AuthenticationManager.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; public class AuthenticationManager implements IAuthenticationManager { private final Map<String, IAuthenticationProvider> authenticationProviders = - new ConcurrentHashMap<String, IAuthenticationProvider>(); + new ConcurrentHashMap<>(); public void addAuthenticationProvider(IAuthenticationProvider authenticationProvider) { final String providerId = authenticationProvider.getProtocol(); diff --git a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/OseeServerThreadFactory.java b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/OseeServerThreadFactory.java index b103bc5fca2..24d52e5f3ad 100644 --- a/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/OseeServerThreadFactory.java +++ b/plugins/org.eclipse.osee.framework.core.server/src/org/eclipse/osee/framework/core/server/internal/OseeServerThreadFactory.java @@ -39,7 +39,7 @@ class OseeServerThreadFactory implements ThreadFactory { public Thread newThread(Runnable runnable) { OseeServerThread thread = new OseeServerThread(runnable, threadName + ":" + threads.size()); thread.setPriority(priority); - this.threads.add(new WeakReference<OseeServerThread>(thread)); + this.threads.add(new WeakReference<>(thread)); return thread; } diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/MultiServiceBinderTest.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/MultiServiceBinderTest.java index 525e5579715..0ca1e211432 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/MultiServiceBinderTest.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/MultiServiceBinderTest.java @@ -287,7 +287,7 @@ public class MultiServiceBinderTest { // Add another dependency to check that onActivate is // not called when dependencies that might be managed by other binders are missing - serviceMap.put(Boolean.class, new HashSet<Object>()); + serviceMap.put(Boolean.class, new HashSet<>()); stringTracker.addingService(serviceReference1); Assert.assertFalse(handler.wasOnActivateCalled()); diff --git a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/SingletonServiceBinderTest.java b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/SingletonServiceBinderTest.java index 01c85681160..03d03ddaaa0 100644 --- a/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/SingletonServiceBinderTest.java +++ b/plugins/org.eclipse.osee.framework.core.test/src/org/eclipse/osee/framework/core/internal/SingletonServiceBinderTest.java @@ -239,7 +239,7 @@ public class SingletonServiceBinderTest { // Add another dependency to check that onActivate is // not called when dependencies that might be managed by other binders are missing - serviceMap.put(Boolean.class, new HashSet<Object>()); + serviceMap.put(Boolean.class, new HashSet<>()); stringTracker.addingService(serviceReference1); Assert.assertFalse(handler.wasOnActivateCalled()); diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OseeClient.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OseeClient.java index e5adb557e64..41bf6d1b7e9 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OseeClient.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/data/OseeClient.java @@ -30,6 +30,6 @@ public class OseeClient { public static int getPort() { String[] splitForPort = getOseeApplicationServer().split(":"); - return (splitForPort.length == 3) ? Integer.valueOf(splitForPort[2]) : PORT; + return splitForPort.length == 3 ? Integer.valueOf(splitForPort[2]) : PORT; } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/executor/internal/ExecutorCache.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/executor/internal/ExecutorCache.java index e5fd67e224a..1502c03cc8c 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/executor/internal/ExecutorCache.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/executor/internal/ExecutorCache.java @@ -22,7 +22,7 @@ import org.eclipse.osee.framework.jdk.core.type.OseeStateException; public class ExecutorCache { private final ConcurrentHashMap<String, ListeningExecutorService> executors = - new ConcurrentHashMap<String, ListeningExecutorService>(); + new ConcurrentHashMap<>(); public void put(String id, ListeningExecutorService service) { if (executors.putIfAbsent(id, service) != null) { diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java index 60ad19486e9..60dc626e4c5 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/grammar/ApplicabilityBlock.java @@ -25,8 +25,8 @@ public class ApplicabilityBlock { }; private ApplicabilityType applicabilityType; - private ArrayList<ApplicabilityBlock> embeddedApplicabilityBlocks; - private ArrayList<String> outerExpressionOperators; + private final ArrayList<ApplicabilityBlock> embeddedApplicabilityBlocks; + private final ArrayList<String> outerExpressionOperators; private String applicabilityExpression; private String optionalEndExpression; private boolean isInTable; diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/AbstractServiceBinder.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/AbstractServiceBinder.java index 0f1a92fdefe..dedae3a5d8b 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/AbstractServiceBinder.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/AbstractServiceBinder.java @@ -50,7 +50,7 @@ public abstract class AbstractServiceBinder { @SuppressWarnings("rawtypes") public ServiceTracker createTracker(Class<?> clazz) { - serviceMap.put(clazz, new CopyOnWriteArraySet<Object>()); + serviceMap.put(clazz, new CopyOnWriteArraySet<>()); return new InternalServiceTracker(this, getBundleContext(), clazz); } diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java index 2cc47febb93..834e8cb3645 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/internal/OperationBuilderImpl.java @@ -110,11 +110,11 @@ public class OperationBuilderImpl implements OperationBuilder { } private Pair<Double, IOperation> createEntry(Double weight, IOperation op) { - return new Pair<Double, IOperation>(weight, op); + return new Pair<>(weight, op); } private Pair<Double, IOperation> createEntryWithNoHint(IOperation op) { - return new Pair<Double, IOperation>(WeightedCompositeOperation.EMPTY_WEIGHT_HINT, op); + return new Pair<>(WeightedCompositeOperation.EMPTY_WEIGHT_HINT, op); } } diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java index 24bc31a52bd..6737784582e 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/HttpProcessor.java @@ -66,7 +66,7 @@ public class HttpProcessor { private static int requests = 0; private static final Map<String, Pair<Integer, Long>> isAliveMap = - new ConcurrentHashMap<String, Pair<Integer, Long>>(); + new ConcurrentHashMap<>(); private HttpProcessor() { // Static class @@ -128,7 +128,7 @@ public class HttpProcessor { private static void cacheAlive(URL url, int code) { String key = toIsAliveKey(url); - isAliveMap.put(key, new Pair<Integer, Long>(code, System.currentTimeMillis())); + isAliveMap.put(key, new Pair<>(code, System.currentTimeMillis())); } private static int executeMethod(URL url, HttpMethodBase method) throws HttpException, IOException, URISyntaxException { diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java index 1cd2abd0294..746e7257809 100644 --- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java +++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/WordCoreUtil.java @@ -126,7 +126,7 @@ public class WordCoreUtil { applicBlockCount += 1; applicabilityBlocks.add(createApplicabilityBlock(ApplicabilityType.Configuration, beginConfiguration)); } - } else if ((endFeature != null && endFeature.toLowerCase().contains(FEATUREAPP))) { + } else if (endFeature != null && endFeature.toLowerCase().contains(FEATUREAPP)) { applicBlockCount -= 1; if (applicabilityBlocks.isEmpty()) { @@ -137,7 +137,7 @@ public class WordCoreUtil { return true; } - } else if ((endConfiguration != null && endConfiguration.toLowerCase().contains(CONFIGAPP))) { + } else if (endConfiguration != null && endConfiguration.toLowerCase().contains(CONFIGAPP)) { applicBlockCount -= 1; if (applicabilityBlocks.isEmpty()) { return true; diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DatabaseInitConfiguration.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DatabaseInitConfiguration.java index f2bd0709d18..edbde6801c7 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DatabaseInitConfiguration.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/DatabaseInitConfiguration.java @@ -59,7 +59,7 @@ public class DatabaseInitConfiguration implements IDatabaseInitConfiguration { public List<String> getOseeTypeExtensionIds() { Set<String> oseeTypes = new LinkedHashSet<>(); oseeTypes.addAll(oseeTypeIds); - return new ArrayList<String>(oseeTypes); + return new ArrayList<>(oseeTypes); } private void addDefaultTask(Collection<String> initTasks, DefaultDbInitTasks task) { diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/Activator.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/Activator.java index 4363f5896e4..d460b103d5a 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/Activator.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/Activator.java @@ -33,7 +33,7 @@ public class Activator implements BundleActivator { Activator.instance = this; serviceTracker2 = - new ServiceTracker<IOseeCachingService, IOseeCachingService>(context, IOseeCachingService.class, null); + new ServiceTracker<>(context, IOseeCachingService.class, null); serviceTracker2.open(true); serviceTracker3 = new ServiceTracker<>(context, JdbcService.class, null); diff --git a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/GroupSelection.java b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/GroupSelection.java index 9f6befcef3a..f7783e49f7c 100644 --- a/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/GroupSelection.java +++ b/plugins/org.eclipse.osee.framework.database.init/src/org/eclipse/osee/framework/database/init/internal/GroupSelection.java @@ -45,7 +45,7 @@ public class GroupSelection implements IGroupSelector { if (!wasInitialized) { wasInitialized = true; ExtensionDefinedObjects<IAddDbInitChoice> contributions = - new ExtensionDefinedObjects<IAddDbInitChoice>(Activator.PLUGIN_ID + ".DatabaseInitializationConfiguration", + new ExtensionDefinedObjects<>(Activator.PLUGIN_ID + ".DatabaseInitializationConfiguration", "DatabaseInitializationConfiguration", "classname"); for (IAddDbInitChoice dbInitChoice : contributions.getObjects()) { dbInitChoice.addDbInitChoice(this); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java index a47cdbb0063..487eb2e36e2 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMapTest.java @@ -29,10 +29,10 @@ public class CompositeKeyHashMapTest { testMap.put("blue", "green", "value5"); List<Pair<String, String>> keyPairs = testMap.getEnumeratedKeys(); Assert.assertEquals(5, keyPairs.size()); - Assert.assertTrue(keyPairs.contains(new Pair<String, String>("red", "red"))); - Assert.assertTrue(keyPairs.contains(new Pair<String, String>("red", "green"))); - Assert.assertTrue(keyPairs.contains(new Pair<String, String>("red", "blue"))); - Assert.assertTrue(keyPairs.contains(new Pair<String, String>("green", "green"))); - Assert.assertTrue(keyPairs.contains(new Pair<String, String>("blue", "green"))); + Assert.assertTrue(keyPairs.contains(new Pair<>("red", "red"))); + Assert.assertTrue(keyPairs.contains(new Pair<>("red", "green"))); + Assert.assertTrue(keyPairs.contains(new Pair<>("red", "blue"))); + Assert.assertTrue(keyPairs.contains(new Pair<>("green", "green"))); + Assert.assertTrue(keyPairs.contains(new Pair<>("blue", "green"))); } } diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java index 018361e0c1a..f50fb33e1fa 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/QuadTest.java @@ -28,13 +28,13 @@ public class QuadTest { private final Quad<Integer, Integer, Integer, Integer> alsoMapToE = new Quad<>(b, c, d, a); private final Quad<Integer, Integer, Integer, Integer> firstEntryNull = - new Quad<Integer, Integer, Integer, Integer>(null, 222, 333, 444); + new Quad<>(null, 222, 333, 444); private final Quad<Integer, Integer, Integer, Integer> secondEntryNull = - new Quad<Integer, Integer, Integer, Integer>(111, null, 333, 444); + new Quad<>(111, null, 333, 444); private final Quad<Integer, Integer, Integer, Integer> thirdEntryNull = - new Quad<Integer, Integer, Integer, Integer>(111, 222, null, 444); + new Quad<>(111, 222, null, 444); private final Quad<Integer, Integer, Integer, Integer> fourthEntryNull = - new Quad<Integer, Integer, Integer, Integer>(111, 222, 333, null); + new Quad<>(111, 222, 333, null); private final Quad<Integer, Integer, Integer, Integer> nonNull = new Quad<>(111, 222, 333, 444); @org.junit.Test @@ -125,7 +125,7 @@ public class QuadTest { @org.junit.Test public void testHashCorrectness() { HashMap<Quad<Integer, Integer, Integer, Integer>, Double> hash = - new HashMap<Quad<Integer, Integer, Integer, Integer>, Double>(); + new HashMap<>(); hash.put(mapToPi, Math.PI); hash.put(mapToE, Math.E); Assert.assertTrue(hash.get(mapToPi).equals(Math.PI)); diff --git a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java index a5b74940c34..0d7aa6eefb7 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java +++ b/plugins/org.eclipse.osee.framework.jdk.core.test/src/org/eclipse/osee/framework/jdk/core/type/TripletTest.java @@ -92,7 +92,7 @@ public class TripletTest { @org.junit.Test public void testHashCorrectness() { HashMap<Triplet<Integer, Integer, Integer>, Double> hash = - new HashMap<Triplet<Integer, Integer, Integer>, Double>(); + new HashMap<>(); hash.put(mapToPi, Math.PI); hash.put(mapToE, Math.E); Assert.assertTrue(hash.get(mapToPi).equals(Math.PI)); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMap.java index ee635ec3027..5281485853c 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyHashMap.java @@ -34,7 +34,7 @@ public class CompositeKeyHashMap<KeyOne, KeyTwo, Value> implements Map<Pair<KeyO @Override protected Pair<KeyOne, KeyTwo> initialValue() { - return new Pair<KeyOne, KeyTwo>(null, null); + return new Pair<>(null, null); } }; @@ -130,7 +130,7 @@ public class CompositeKeyHashMap<KeyOne, KeyTwo, Value> implements Map<Pair<KeyO public List<Pair<KeyOne, KeyTwo>> getEnumeratedKeys() { List<Pair<KeyOne, KeyTwo>> toReturn = new ArrayList<>(); for (KeyOne firstKey : singleKeyMap.keySet()) { - singleKeyMap.forEachValue(firstKey, secondKey -> toReturn.add(new Pair<KeyOne, KeyTwo>(firstKey, secondKey))); + singleKeyMap.forEachValue(firstKey, secondKey -> toReturn.add(new Pair<>(firstKey, secondKey))); } return toReturn; } @@ -153,7 +153,7 @@ public class CompositeKeyHashMap<KeyOne, KeyTwo, Value> implements Map<Pair<KeyO public Value put(KeyOne key1, KeyTwo key2, Value value) { put(key1, key2); - return map.put(new Pair<KeyOne, KeyTwo>(key1, key2), value); + return map.put(new Pair<>(key1, key2), value); } @Override diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyQuadHashMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyQuadHashMap.java index 8b92a424e1d..5e94e4f1565 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyQuadHashMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyQuadHashMap.java @@ -29,7 +29,7 @@ public class CompositeKeyQuadHashMap<KeyOne, KeyTwo, KeyThree, KeyFour, Value> i @Override protected Quad<KeyOne, KeyTwo, KeyThree, KeyFour> initialValue() { - return new Quad<KeyOne, KeyTwo, KeyThree, KeyFour>(null, null, null, null); + return new Quad<>(null, null, null, null); } }; @@ -100,7 +100,7 @@ public class CompositeKeyQuadHashMap<KeyOne, KeyTwo, KeyThree, KeyFour, Value> i } public Value put(KeyOne a, KeyTwo b, KeyThree c, KeyFour d, Value value) { - return map.put(new Quad<KeyOne, KeyTwo, KeyThree, KeyFour>(a, b, c, d), value); + return map.put(new Quad<>(a, b, c, d), value); } @Override diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyTripleHashMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyTripleHashMap.java index 33c8d58be72..d0cbf5687e2 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyTripleHashMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/CompositeKeyTripleHashMap.java @@ -29,7 +29,7 @@ public class CompositeKeyTripleHashMap<KeyOne, KeyTwo, KeyThree, Value> implemen @Override protected Triplet<KeyOne, KeyTwo, KeyThree> initialValue() { - return new Triplet<KeyOne, KeyTwo, KeyThree>(null, null, null); + return new Triplet<>(null, null, null); } }; @@ -100,7 +100,7 @@ public class CompositeKeyTripleHashMap<KeyOne, KeyTwo, KeyThree, Value> implemen } public Value put(KeyOne a, KeyTwo b, KeyThree c, Value value) { - return map.put(new Triplet<KeyOne, KeyTwo, KeyThree>(a, b, c), value); + return map.put(new Triplet<>(a, b, c), value); } @Override diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyCountingMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyCountingMap.java index 786ae46e0dc..64769b12cef 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyCountingMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyCountingMap.java @@ -124,9 +124,9 @@ public class DoubleKeyCountingMap<KeyOne, KeyTwo> { public Collection<MutableInteger> allValues(KeyOne key) { HashMap<KeyTwo, MutableInteger> map = k1ToHashMap.get(key); if (map != null) { - return new HashSet<MutableInteger>(map.values()); + return new HashSet<>(map.values()); } - return new HashSet<MutableInteger>(); + return new HashSet<>(); } public Map<KeyTwo, MutableInteger> getSubHash(KeyOne k1) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyHashMap.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyHashMap.java index c9e0253c933..4c96ccd47d9 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyHashMap.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/DoubleKeyHashMap.java @@ -105,9 +105,9 @@ public class DoubleKeyHashMap<KeyOne, KeyTwo, Value> { public Collection<Value> allValues(KeyOne key) { HashMap<KeyTwo, Value> map = k1ToHashMap.get(key); if (map != null) { - return new HashSet<Value>(map.values()); + return new HashSet<>(map.values()); } - return new HashSet<Value>(); + return new HashSet<>(); } public Map<KeyTwo, Value> getSubHash(KeyOne k1) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java index 3f82b9f68e2..6e8e7d83e3a 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java @@ -182,7 +182,7 @@ public class PropertyStoreWriter { tagListKey = reader.getAttributeValue(uri, TAG_KEY); } else if (TAG_INNER.equals(name)) { String key = reader.getAttributeValue(uri, TAG_KEY); - innerStoreStack.add(new Pair<String, PropertyStore>(key, new PropertyStore())); + innerStoreStack.add(new Pair<>(key, new PropertyStore())); } break; case XMLStreamConstants.END_ELEMENT: diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java index 0b83bff18bc..ff106c0fcae 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/Collections.java @@ -228,7 +228,7 @@ public class Collections { if (items.size() > maxPerList) { return recursiveAggregateTree(items, maxPerList); } else { - return new ArrayList<Object>(items); + return new ArrayList<>(items); } } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/benchmark/Benchmark.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/benchmark/Benchmark.java index 59ce4d4f806..fde8789db68 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/benchmark/Benchmark.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/benchmark/Benchmark.java @@ -278,7 +278,7 @@ public class Benchmark { public static List<Benchmark> getAllBenchamrks() { synchronized (list) { - return new ArrayList<Benchmark>(list); + return new ArrayList<>(list); } } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/IEnumValueBuilder.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/IEnumValueBuilder.java index 0a417d67b75..722553b8549 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/IEnumValueBuilder.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/IEnumValueBuilder.java @@ -26,7 +26,7 @@ public class IEnumValueBuilder extends JavaFileBuilder { super(packageName, className, classJavaDoc, null); // Place the enums in a priority queue based on their number value - enums = new PriorityQueue<EnumRecord>(20, new Comparator<EnumRecord>() { + enums = new PriorityQueue<>(20, new Comparator<EnumRecord>() { @Override public int compare(EnumRecord i, EnumRecord j) { diff --git a/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/LifecycleServiceImpl.java b/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/LifecycleServiceImpl.java index e333f69d59d..dc372ac7691 100644 --- a/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/LifecycleServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.lifecycle/src/org/eclipse/osee/framework/lifecycle/LifecycleServiceImpl.java @@ -25,7 +25,7 @@ import org.eclipse.osee.framework.jdk.core.util.Conditions; public class LifecycleServiceImpl implements ILifecycleService { private final HashCollection<AbstractLifecycleVisitor.Type<?>, LifecycleHandler> handlersByType = - new HashCollection<AbstractLifecycleVisitor.Type<?>, LifecycleHandler>(); + new HashCollection<>(); @Override public Collection<AbstractLifecycleVisitor.Type<?>> getHandlerTypes() { diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/AttributeEventModificationType.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/AttributeEventModificationType.java index 76229b1110d..270d2fdbf79 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/AttributeEventModificationType.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/AttributeEventModificationType.java @@ -28,9 +28,9 @@ public class AttributeEventModificationType { private final ModificationType modificationType; private final String guid; private static Map<ModificationType, AttributeEventModificationType> modTypeToEventType = - new HashMap<ModificationType, AttributeEventModificationType>(15); + new HashMap<>(15); private static Map<String, AttributeEventModificationType> guidToEventType = - new HashMap<String, AttributeEventModificationType>(15); + new HashMap<>(15); public static AttributeEventModificationType Modified = new AttributeEventModificationType(ModificationType.MODIFIED, "AYsmVz6VujxZxW3ByjgA"); public static AttributeEventModificationType Artifact_Deleted = diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/BranchEventModificationType.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/BranchEventModificationType.java index 8dd3704f3d7..dfc60b4af96 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/BranchEventModificationType.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/BranchEventModificationType.java @@ -21,7 +21,7 @@ public class BranchEventModificationType { private final String guid; private static Map<String, BranchEventModificationType> guidToEventType = - new HashMap<String, BranchEventModificationType>(15); + new HashMap<>(15); public static BranchEventModificationType New = new BranchEventModificationType("AbMBZMtQ304V3L3zdlgA"); public static BranchEventModificationType Committed = new BranchEventModificationType("AbMBZDMIWATP9NaK0bAA"); public static BranchEventModificationType Deleted = new BranchEventModificationType("AbMBZE3UESatk0iX0RgA"); diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/BroadcastEventModificationType.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/BroadcastEventModificationType.java index 0e4a5f2c744..08ad0924b14 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/BroadcastEventModificationType.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/BroadcastEventModificationType.java @@ -21,7 +21,7 @@ public class BroadcastEventModificationType { private final String guid; private static Map<String, BroadcastEventModificationType> guidToEventType = - new HashMap<String, BroadcastEventModificationType>(15); + new HashMap<>(15); public static BroadcastEventModificationType Message = new BroadcastEventModificationType("Aylfa1sC4iArrIaXxugA"); public static BroadcastEventModificationType Shutdown = new BroadcastEventModificationType("Aylfa1swuASdF_H2OYQA"); diff --git a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java index 5a3c6a59ca8..558341b098e 100644 --- a/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.messaging.event.res/src/org/eclipse/osee/framework/messaging/event/res/internal/OseeCoreModelEventServiceImpl.java @@ -34,7 +34,7 @@ import org.eclipse.osee.framework.messaging.event.res.RemoteEvent; public class OseeCoreModelEventServiceImpl implements OseeMessagingStatusCallback, IOseeCoreModelEventService { private final Map<IFrameworkEventListener, HashCollectionSet<ResMessages, OseeMessagingListener>> subscriptions = - new ConcurrentHashMap<IFrameworkEventListener, HashCollectionSet<ResMessages, OseeMessagingListener>>(); + new ConcurrentHashMap<>(); private final Map<ResMessages, Boolean> messages; private final MessageService messageService; diff --git a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/data/ObjectFactory.java b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/data/ObjectFactory.java index 5da50d504e4..741de488630 100644 --- a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/data/ObjectFactory.java +++ b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/data/ObjectFactory.java @@ -50,7 +50,7 @@ public class ObjectFactory { */ @XmlElementDecl(namespace = "", name = "TestMessage") public JAXBElement<TestMessage> createTestMessage(TestMessage value) { - return new JAXBElement<TestMessage>(_TestMessage_QNAME, TestMessage.class, null, value); + return new JAXBElement<>(_TestMessage_QNAME, TestMessage.class, null, value); } } diff --git a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/rules/MessageBroker.java b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/rules/MessageBroker.java index cb83b5d2fc8..89685e8c9de 100644 --- a/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/rules/MessageBroker.java +++ b/plugins/org.eclipse.osee.framework.messaging.test/src/org/eclipse/osee/framework/messaging/rules/MessageBroker.java @@ -67,7 +67,7 @@ public class MessageBroker implements MethodRule { private AnnotationProcessor createProcessor(HasMessageService hasMessageService) { Map<Class<? extends Annotation>, FieldAnnotationHandler<?>> annotationHandlers = - new HashMap<Class<? extends Annotation>, FieldAnnotationHandler<?>>(); + new HashMap<>(); annotationHandlers.put(InjectMessageService.class, new MessageServiceFieldAnnotationHandler(hasMessageService)); annotationHandlers.put(MessageConnection.class, new MessageConnectionFieldAnnotationHandler(hasMessageService)); return new AnnotationProcessor(annotationHandlers); diff --git a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java index 9eba98f4d81..052c3707b95 100644 --- a/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.messaging/src/org/eclipse/osee/framework/messaging/internal/MessageServiceImpl.java @@ -70,7 +70,7 @@ public class MessageServiceImpl implements MessageService { @Override public Collection<NodeInfo> getAvailableConnections() { - return new ArrayList<NodeInfo>(connectionNodes.keySet()); + return new ArrayList<>(connectionNodes.keySet()); } @Override diff --git a/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/AdminServlet.java b/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/AdminServlet.java index 6fda65f9c1d..b3de120f9e2 100644 --- a/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/AdminServlet.java +++ b/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/AdminServlet.java @@ -103,7 +103,7 @@ public class AdminServlet extends UnsecuredOseeHttpServlet { private static Map<String, CommandProvider> getCommands(BundleContext context) { Map<String, CommandProvider> data = new HashMap<>(); ServiceTracker<CommandProvider, CommandProvider> tracker = - new ServiceTracker<CommandProvider, CommandProvider>(context, CommandProvider.class, null); + new ServiceTracker<>(context, CommandProvider.class, null); tracker.open(true); try { Object[] services = tracker.getServices(); diff --git a/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/internal/ClientEndpointImpl.java b/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/internal/ClientEndpointImpl.java index 2561b27cfac..6bb47d95c85 100644 --- a/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/internal/ClientEndpointImpl.java +++ b/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/internal/ClientEndpointImpl.java @@ -270,7 +270,7 @@ public class ClientEndpointImpl implements ClientEndpoint { Process p1 = java.lang.Runtime.getRuntime().exec(String.format("ping %s 1 %s", option, session.getClientAddress())); int returnVal = p1.waitFor(); - reachable = (returnVal == 0); + reachable = returnVal == 0; } catch (Exception ex1) { // do nothing } diff --git a/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/internal/SessionEndpointImpl.java b/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/internal/SessionEndpointImpl.java index c56b2fffbdf..748ab6c9f33 100644 --- a/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/internal/SessionEndpointImpl.java +++ b/plugins/org.eclipse.osee.framework.server.ide/src/org/eclipse/osee/framework/server/ide/internal/SessionEndpointImpl.java @@ -84,7 +84,7 @@ public class SessionEndpointImpl implements SessionEndpoint { @Path("session/protocols") @Produces({MediaType.APPLICATION_JSON}) public Response getIdeClientProtocols() { - List<String> protocols = new LinkedList<String>(); + List<String> protocols = new LinkedList<>(); for (String protocol : authenticationManager.getProtocols()) { protocols.add(protocol); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java index 14328b88976..cf56e2266f9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java +++ b/plugins/org.eclipse.osee.framework.skynet.core.test/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolutionAndNumberTest.java @@ -74,7 +74,7 @@ public final class OutlineResolutionAndNumberTest { @Test public void testNextSetGeneration() { Set<String> nextPossibleSet = outlineResolution.generateNextSet(new ReqNumbering(LAST_OUTLINE_NUMBER)); - Set<String> expected = new HashSet<String>(Arrays.asList("3.2", "3.1.2", "3.1.1.3", "3.1.1.2.2", "3.1.1.2.1.8", + Set<String> expected = new HashSet<>(Arrays.asList("3.2", "3.1.2", "3.1.1.3", "3.1.1.2.2", "3.1.1.2.1.8", "4.0", "3.1.1.2.1.7.1", "3.1.1.2.1.7.0.1")); addDotEndingSet(expected); expected.removeAll(nextPossibleSet); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java index 030faf2e192..86eecb9c1b9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/UserManager.java @@ -58,7 +58,7 @@ public final class UserManager { } }; - return new FutureTask<UserAdmin>(callable); + return new FutureTask<>(callable); } }; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java index ae73b96773b..4e1711d46b5 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java @@ -106,7 +106,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F public static final String AFTER_GUID_STRING = "/AfterGUID"; private final HashCollection<AttributeTypeId, Attribute<?>> attributes = new HashCollection<>(true); private final Set<DefaultBasicUuidRelationReorder> relationOrderRecords = - new HashSet<DefaultBasicUuidRelationReorder>(); + new HashSet<>(); private final BranchId branch; private TransactionToken transaction = TransactionToken.SENTINEL; private GammaId gammaId; @@ -220,7 +220,7 @@ public class Artifact extends NamedIdBase implements ArtifactToken, Adaptable, F boolean sideA = relationSide.getSide().isSideA(); Artifact artifactA = sideA ? artifact : this; Artifact artifactB = sideA ? this : artifact; - return new Pair<Artifact, Artifact>(artifactA, artifactB); + return new Pair<>(artifactA, artifactB); } /** diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactChecks.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactChecks.java index ed4e51197ff..53973ad3e0a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactChecks.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactChecks.java @@ -26,7 +26,7 @@ public class ArtifactChecks { private static List<IArtifactCheck> checks = null; private static final ExtensionDefinedObjects<IArtifactCheck> artifactCheckObjects = - new ExtensionDefinedObjects<IArtifactCheck>(EXTENSION_ID, ELEMENT_ID, CLASS_NAME_ATTRIBUTE, true); + new ExtensionDefinedObjects<>(EXTENSION_ID, ELEMENT_ID, CLASS_NAME_ATTRIBUTE, true); public static List<IArtifactCheck> getArtifactChecks() { if (checks == null) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java index 4a368e9f989..39bf52034ff 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java @@ -66,7 +66,7 @@ public final class ArtifactLoader { if (confirmer != null) { confirmer.canProceed(artifacts.size()); } - return new LinkedList<Artifact>(artifacts); + return new LinkedList<>(artifacts); } public static List<Artifact> loadArtifacts(Collection<? extends ArtifactId> artIds, BranchId branch, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted) { @@ -94,7 +94,7 @@ public final class ArtifactLoader { } else { loadActiveArtifacts(toLoad, artifacts, loadLevel, reload, allowDeleted, isArchived); } - return new LinkedList<Artifact>(artifacts); + return new LinkedList<>(artifacts); } private static void loadActiveArtifacts(List<ArtifactToken> toLoad, Set<Artifact> artifacts, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted, boolean isArchived) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java index 45551e11110..2238793c1f3 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/BranchManager.java @@ -415,7 +415,7 @@ public final class BranchManager { } private static void runCommitExtPointActions(ConflictManagerExternal conflictManager) { - ExtensionDefinedObjects<CommitAction> extensions = new ExtensionDefinedObjects<CommitAction>( + ExtensionDefinedObjects<CommitAction> extensions = new ExtensionDefinedObjects<>( "org.eclipse.osee.framework.skynet.core.CommitActions", "CommitActions", "className"); for (CommitAction commitAction : extensions.getObjects()) { commitAction.runCommitAction(conflictManager.getSourceBranch(), conflictManager.getDestinationBranch()); @@ -545,7 +545,7 @@ public final class BranchManager { private static BranchId getDefaultInitialBranch() { ExtensionDefinedObjects<IDefaultInitialBranchesProvider> extensions = - new ExtensionDefinedObjects<IDefaultInitialBranchesProvider>( + new ExtensionDefinedObjects<>( "org.eclipse.osee.framework.skynet.core.DefaultInitialBranchProvider", "DefaultInitialBranchProvider", "class", true); for (IDefaultInitialBranchesProvider provider : extensions.getObjects()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java index 1784c7a9332..aab39a58df6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UniversalGroup.java @@ -60,7 +60,7 @@ public class UniversalGroup { } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); } - return new ArrayList<Artifact>(); + return new ArrayList<>(); } public static Artifact getGroupOrNull(ArtifactToken groupToken, BranchId branch) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ArtifactIdCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ArtifactIdCache.java index 27a86991346..493666c7071 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ArtifactIdCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ArtifactIdCache.java @@ -97,7 +97,7 @@ public class ArtifactIdCache { } else if (artifact.isDirty()) { return artifact; } else { - return new WeakReference<Artifact>(artifact); + return new WeakReference<>(artifact); } } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java index 768c22d3def..f148027068c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/factory/ArtifactFactoryManager.java @@ -31,7 +31,7 @@ public final class ArtifactFactoryManager { private static final String CLASSNAME_ATTRIBUTE = "classname"; private static final ExtensionDefinedObjects<ArtifactFactory> extensionDefinedObjects = - new ExtensionDefinedObjects<ArtifactFactory>(EXTENSION_ID, ARTIFACT_FACTORY_EXTENSION, CLASSNAME_ATTRIBUTE); + new ExtensionDefinedObjects<>(EXTENSION_ID, ARTIFACT_FACTORY_EXTENSION, CLASSNAME_ATTRIBUTE); private static final DefaultArtifactFactory defaultArtifactFactory = new DefaultArtifactFactory(); private static Set<ArtifactTypeId> eternalArtifactTypes = null; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java index 8c1d3e5ad33..c35ca5b40ee 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeExtensionManager.java @@ -113,7 +113,7 @@ public class AttributeExtensionManager { String bundleName = Strings.intern(element.getContributor().getName()); if (Strings.isValid(bundleName) && Strings.isValid(className)) { - toReturn.put(name, new Pair<String, String>(bundleName, className)); + toReturn.put(name, new Pair<>(bundleName, className)); } } } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchArtifactChanges.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchArtifactChanges.java index 5a08facbb60..0946e60f29b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchArtifactChanges.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchArtifactChanges.java @@ -36,8 +36,8 @@ public class CatchArtifactChanges implements CommitAction { IOperation operation = ChangeManager.compareTwoBranchesHead(sourceBranch, destinationBranch, changes); Operations.executeWorkAndCheckStatus(operation); - Set<Integer> orphanedArts = new HashSet<Integer>(); - Set<Integer> shouldBeDeletedArts = new HashSet<Integer>(); + Set<Integer> orphanedArts = new HashSet<>(); + Set<Integer> shouldBeDeletedArts = new HashSet<>(); for (Change change : changes) { Artifact artifactChanged = change.getChangeArtifact(); if (artifactChanged.isOfType(CoreArtifactTypes.AbstractImplementationDetails, @@ -59,7 +59,7 @@ public class CatchArtifactChanges implements CommitAction { String temp = String.format("Commit Branch Failed. The following artifacts are deleted but still have relations. " // + " Please remove the relations, then recommit : [%s]\n\n", shouldBeDeletedArts.toString()); - err = (err == null) ? temp : err + temp; + err = err == null ? temp : err + temp; } if (err != null) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchWordMlChanges.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchWordMlChanges.java index 6cd554ab310..02c0f3379ee 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchWordMlChanges.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchWordMlChanges.java @@ -48,8 +48,8 @@ public class CatchWordMlChanges implements CommitAction { IOperation operation = ChangeManager.compareTwoBranchesHead(sourceBranch, destinationBranch, changes); Operations.executeWorkAndCheckStatus(operation); - Map<Integer, String> trackedChanges = new HashMap<Integer, String>(); - Map<Integer, String> applicabilityTags = new HashMap<Integer, String>(); + Map<Integer, String> trackedChanges = new HashMap<>(); + Map<Integer, String> applicabilityTags = new HashMap<>(); for (Change change : changes) { if (!change.getModificationType().isDeleted()) { if (change.getChangeType() == LoadChangeType.attribute) { @@ -63,9 +63,9 @@ public class CatchWordMlChanges implements CommitAction { Boolean useInvalidTagsCheck = Boolean.valueOf(OseeInfo.getCachedValue("osee.are.applicability.tags.invalid")); Boolean isInvalidTags = - useInvalidTagsCheck ? (((WordAttribute) attribute).areApplicabilityTagsInvalid(destinationBranch, + useInvalidTagsCheck ? ((WordAttribute) attribute).areApplicabilityTagsInvalid(destinationBranch, ApplicabilityUtility.getValidFeatureValuesForBranch(destinationBranch), - ApplicabilityUtility.getBranchViewNamesUpperCase(destinationBranch))) : useInvalidTagsCheck; + ApplicabilityUtility.getBranchViewNamesUpperCase(destinationBranch)) : useInvalidTagsCheck; if (isInvalidTags) { applicabilityTags.put(attribute.getArtifact().getArtId(), attribute.getArtifact().getSafeName()); } @@ -94,7 +94,7 @@ public class CatchWordMlChanges implements CommitAction { + "Please fix the tags, then recommit: [%s]", applicabilityTags.toString()); - err = (err == null) ? temp : err + temp; + err = err == null ? temp : err + temp; } if (err != null) { @@ -102,8 +102,4 @@ public class CatchWordMlChanges implements CommitAction { } } - - private String getArtifactErrorMessage(Artifact artifact) { - return String.format("Error validating [%s] on branch [%s]", artifact.toStringWithId(), artifact.getBranch()); - } } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java index d017aadd2d9..9f76a970821 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/AttributeConflict.java @@ -207,7 +207,7 @@ public class AttributeConflict extends Conflict { } public TreeSet<String> getEnumerationAttributeValues() { - return new TreeSet<String>(AttributeTypeManager.getEnumerationValues(getAttributeType())); + return new TreeSet<>(AttributeTypeManager.getEnumerationValues(getAttributeType())); } public boolean setStringAttributeValue(String value) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/PurgeTransactionEventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/PurgeTransactionEventUtil.java index 52a76d31184..6d97b127bdd 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/PurgeTransactionEventUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/PurgeTransactionEventUtil.java @@ -75,7 +75,7 @@ public final class PurgeTransactionEventUtil { } } } - return new Pair<TransactionEvent, Map<String, Long>>(transactionEvent, guidToId); + return new Pair<>(transactionEvent, guidToId); } public static void handleRemotePurgeTransactionEvent(TransactionEvent transEvent) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java index 59f9533bf80..0e43d3f9b99 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/ArtifactEvent.java @@ -47,7 +47,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender, HasBranc private final List<EventBasicGuidArtifact> artifacts = new ArrayList<>(); private final List<EventBasicGuidRelation> relations = new ArrayList<>(); private final Set<DefaultBasicUuidRelationReorder> relationReorderRecords = - new HashSet<DefaultBasicUuidRelationReorder>(); + new HashSet<>(); private final ArtifactEventType reloadEvent; public ArtifactEvent(BranchId branch) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientLoopbackHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientLoopbackHandler.java index 08939b1a81b..c7ff3aa7900 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientLoopbackHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientLoopbackHandler.java @@ -24,7 +24,7 @@ import org.eclipse.osee.framework.skynet.core.internal.Activator; public class ClientLoopbackHandler implements IHttpServerRequest { private static final ExtensionDefinedObjects<IClientLoopbackCmd> commands = - new ExtensionDefinedObjects<IClientLoopbackCmd>(Activator.PLUGIN_ID + ".ClientLoopbackCmd", "ClientLoopbackCmd", + new ExtensionDefinedObjects<>(Activator.PLUGIN_ID + ".ClientLoopbackCmd", "ClientLoopbackCmd", "className"); @Override diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorContributionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorContributionManager.java index 95331a2b1d8..acd56701a8a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorContributionManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/ArtifactExtractorContributionManager.java @@ -33,7 +33,7 @@ public class ArtifactExtractorContributionManager { public List<IArtifactExtractor> getExtractors() { ExtensionDefinedObjects<IArtifactExtractor> definedObjects = - new ExtensionDefinedObjects<IArtifactExtractor>(PARSER_EXTENSION, PARSER_ELEMENT, CLASS_NAME_ATTRIBUTE, true); + new ExtensionDefinedObjects<>(PARSER_EXTENSION, PARSER_ELEMENT, CLASS_NAME_ATTRIBUTE, true); List<IArtifactExtractor> items = definedObjects.getObjects(); Collections.sort(items, new ParserComparator()); return items; @@ -42,7 +42,7 @@ public class ArtifactExtractorContributionManager { public List<IArtifactExtractorDelegate> getAllDelegates() { List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<>(); ExtensionDefinedObjects<IArtifactExtractorDelegate> contributions = - new ExtensionDefinedObjects<IArtifactExtractorDelegate>(PARSER_DELEGATE_EXTENSION, PARSER_DELEGATE_ELEMENT, + new ExtensionDefinedObjects<>(PARSER_DELEGATE_EXTENSION, PARSER_DELEGATE_ELEMENT, CLASS_NAME_ATTRIBUTE, true); for (IArtifactExtractorDelegate delegate : contributions.getObjects()) { contentHandlers.add(delegate); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughAttributeSet.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughAttributeSet.java index c4fb764d487..96e313c710f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughAttributeSet.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughAttributeSet.java @@ -31,7 +31,7 @@ import org.eclipse.osee.framework.skynet.core.importing.RoughAttributeSet.RoughA public final class RoughAttributeSet implements Iterable<Entry<CaseInsensitiveString, Collection<RoughAttribute>>> { private final Map<CaseInsensitiveString, Collection<RoughAttribute>> attributes = - new LinkedHashMap<CaseInsensitiveString, Collection<RoughAttribute>>(); + new LinkedHashMap<>(); public void clear() { attributes.clear(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsTableRowCollector.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsTableRowCollector.java index 10c1bbdb87e..e348a58e2c3 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsTableRowCollector.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsTableRowCollector.java @@ -12,9 +12,7 @@ package org.eclipse.osee.framework.skynet.core.importing.parsers; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import java.io.FileNotFoundException; import java.io.PrintWriter; -import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; @@ -24,7 +22,6 @@ import java.util.Stack; import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException; import org.eclipse.osee.framework.jdk.core.type.OseeStateException; import org.eclipse.osee.framework.jdk.core.util.Conditions; -import org.eclipse.osee.framework.jdk.core.util.Lib; import org.eclipse.osee.framework.skynet.core.importing.operations.RoughArtifactCollector; import org.eclipse.osee.framework.skynet.core.importing.parsers.DoorsTableRow.RowType; import org.jsoup.nodes.Element; @@ -266,20 +263,6 @@ public class DoorsTableRowCollector { return columns; } - // currently used only for debugging purposes - // this makes it simple to check the contents of the import using a diff - @SuppressWarnings("unused") - private void outputHTML(String file) throws FileNotFoundException, UnsupportedEncodingException { - String outputfile = String.format("%s%s.html", file, Lib.getDateTimeString()); - PrintWriter writer = new PrintWriter(outputfile, "UTF-8"); - try { - outputHTML(writer); - } finally { - writer.close(); - } - - } - public void outputHTML(PrintWriter writer) { writer.println( "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">"); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ExcelArtifactExtractor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ExcelArtifactExtractor.java index 087213946b1..14ad6b47795 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ExcelArtifactExtractor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/ExcelArtifactExtractor.java @@ -81,7 +81,7 @@ public class ExcelArtifactExtractor extends AbstractArtifactExtractor { private static final class ExcelRowProcessor implements RowProcessor { private final DoubleKeyHashMap<String, Integer, RoughArtifact> relationHelper = - new DoubleKeyHashMap<String, Integer, RoughArtifact>(); + new DoubleKeyHashMap<>(); private static enum RowTypeEnum { PARAGRAPH_NO(CoreAttributeTypes.ParagraphNumber.getName()), diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/HandleImport.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/HandleImport.java index b75f85d78f2..79f1f6ae759 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/HandleImport.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/HandleImport.java @@ -27,7 +27,7 @@ public class HandleImport { private static final String IMPORT_HANDLER_ID = "ImportHandler"; public static void handleImport(Collection<URI> resources, Object destination, boolean persistChanges) { - ExtensionDefinedObjects<ImportHandler> handlerExtensions = new ExtensionDefinedObjects<ImportHandler>( + ExtensionDefinedObjects<ImportHandler> handlerExtensions = new ExtensionDefinedObjects<>( Activator.PLUGIN_ID + "." + IMPORT_HANDLER_ID, IMPORT_HANDLER_ID, CLASSNAME); List<ImportHandler> handlers = handlerExtensions.getObjects(); Collections.sort(handlers, new Comparator<ImportHandler>() { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java index 3b8db5e6116..76d1314e09a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/DslToTypeLoader.java @@ -163,7 +163,7 @@ public class DslToTypeLoader implements TypesLoader { } private Map<BranchId, Collection<AttributeType>> getOseeAttributes(TypeBuffer buffer, BranchCache branchCache, XArtifactType xArtifactType) { - Map<BranchId, Collection<AttributeType>> validAttributes = new HashMap<BranchId, Collection<AttributeType>>(); + Map<BranchId, Collection<AttributeType>> validAttributes = new HashMap<>(); for (XAttributeTypeRef xAttributeTypeRef : xArtifactType.getValidAttributeTypes()) { XAttributeType xAttributeType = xAttributeTypeRef.getValidAttributeType(); BranchId branch = getAttributeBranch(branchCache, xAttributeTypeRef); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java index 314c0de8bb3..0e01f181d9b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/OseeEventServiceImpl.java @@ -73,7 +73,7 @@ public class OseeEventServiceImpl implements OseeEventService { private ExecutorService executor; private final List<ServiceReference<IEventListener>> pendingServices = - new CopyOnWriteArrayList<ServiceReference<IEventListener>>(); + new CopyOnWriteArrayList<>(); private Thread thread; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlers.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlers.java index f27e2ea1145..ae543311574 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlers.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventHandlers.java @@ -22,10 +22,10 @@ import org.eclipse.osee.framework.skynet.core.event.model.FrameworkEvent; public class EventHandlers { private final Map<Class<? extends FrameworkEvent>, EventHandlerLocal<? extends IEventListener, ? extends FrameworkEvent>> handlers = - new HashMap<Class<? extends FrameworkEvent>, EventHandlerLocal<? extends IEventListener, ? extends FrameworkEvent>>(); + new HashMap<>(); private final Map<Class<? extends RemoteEvent>, EventHandlerRemote<? extends RemoteEvent>> remoteHandlers = - new HashMap<Class<? extends RemoteEvent>, EventHandlerRemote<? extends RemoteEvent>>(); + new HashMap<>(); public void addLocalHandler(Class<? extends FrameworkEvent> clazz, EventHandlerLocal<? extends IEventListener, ? extends FrameworkEvent> handler) { handlers.put(clazz, handler); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistry.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistry.java index fa98d58e8a4..6875aa1d591 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistry.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/EventListenerRegistry.java @@ -30,7 +30,7 @@ import org.eclipse.osee.framework.skynet.core.event.model.FrameworkEvent; public class EventListenerRegistry { private final Map<EventQosType, EventListeners> qosToListeners = - new ConcurrentHashMap<EventQosType, EventListeners>(); + new ConcurrentHashMap<>(); private final Set<IEventListener> listenerSet = new HashSet<>(); public void addListener(EventQosType qos, IEventListener listener) { @@ -115,7 +115,7 @@ public class EventListenerRegistry { } private final static class EventListeners { private final Map<Class<? extends FrameworkEvent>, Set<IEventListener>> eventClassToListeners = - new ConcurrentHashMap<Class<? extends FrameworkEvent>, Set<IEventListener>>(); + new ConcurrentHashMap<>(); private int size = 0; public void addListener(IEventListener listener) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/OseeEventThreadFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/OseeEventThreadFactory.java index 0971caecd95..3dd8dc75ccf 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/OseeEventThreadFactory.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/event/OseeEventThreadFactory.java @@ -37,7 +37,7 @@ public final class OseeEventThreadFactory implements ThreadFactory { public Thread newThread(Runnable runnable) { Thread thread = new Thread(runnable, threadName + ":" + threads.size()); thread.setPriority(priority); - this.threads.add(new WeakReference<Thread>(thread)); + this.threads.add(new WeakReference<>(thread)); return thread; } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/BootStrapUser.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/BootStrapUser.java index c6cfa6391d0..5275fa9c613 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/BootStrapUser.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/BootStrapUser.java @@ -33,9 +33,6 @@ public class BootStrapUser extends User { return instance; } - @SuppressWarnings("unused") - private static final long serialVersionUID = 1L; - @Override public String getEmail() { return SystemUser.BootStrap.getEmail(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java index 2cc177b2c87..20d42f3c948 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/CurrentUserProvider.java @@ -53,7 +53,7 @@ public class CurrentUserProvider extends LazyObject<User> { protected FutureTask<User> createLoaderTask() { duringCreateUser.set(false); Callable<User> callable = new CurrentUserCreationCallable(); - return new FutureTask<User>(callable); + return new FutureTask<>(callable); } private final class CurrentUserCreationCallable implements Callable<User> { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserCacheProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserCacheProvider.java index 7e97db2a50a..7e8105b18b1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserCacheProvider.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserCacheProvider.java @@ -50,7 +50,7 @@ public class UserCacheProvider extends LazyObject<Cache<String, User>> { return userCache; } }; - return new FutureTask<Cache<String, User>>(callable); + return new FutureTask<>(callable); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserKeysProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserKeysProvider.java index 11c34e94634..21f36016110 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserKeysProvider.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserKeysProvider.java @@ -50,7 +50,7 @@ public class UserKeysProvider extends LazyObject<Iterable<? extends String>> imp } }; - return new FutureTask<Iterable<? extends String>>(callable); + return new FutureTask<>(callable); } } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java index 3b822f8df54..edea99df0d2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderData.java @@ -72,7 +72,7 @@ public class RelationOrderData { public List<String> getOrderList(RelationTypeToken type, RelationSide side) { Pair<RelationSorter, List<String>> currentOrder = getTypeSideEntry(type, side); - return currentOrder != null ? currentOrder.getSecond() : new ArrayList<String>(); + return currentOrder != null ? currentOrder.getSecond() : new ArrayList<>(); } public RelationSorter getCurrentSorterGuid(RelationType type, RelationSide side) { @@ -85,7 +85,7 @@ public class RelationOrderData { } public void addOrderList(RelationTypeToken relationType, RelationSide relationSide, RelationSorter sorterId, List<String> guidList) { - lists.put(relationType, relationSide, new Pair<RelationSorter, List<String>>(sorterId, guidList)); + lists.put(relationType, relationSide, new Pair<>(sorterId, guidList)); } public void removeOrderList(RelationTypeToken type, RelationSide side) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java index 8cbb111f7cc..a4e7f1720fc 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeManager.java @@ -151,7 +151,7 @@ public final class ChangeManager { HashCollection<Artifact, BranchId> branchMap = new HashCollection<>(); try (Id4JoinQuery joinQuery = JoinUtility.createId4JoinQuery()) { CompositeKeyHashMap<Integer, BranchId, Artifact> artifactMap = - new CompositeKeyHashMap<Integer, BranchId, Artifact>(); + new CompositeKeyHashMap<>(); for (Artifact artifact : artifacts) { artifactMap.put(artifact.getArtId(), artifact.getBranch(), artifact); // for each combination of artifact and all working branches in its hierarchy diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java index 3e94ce12d03..e6ff23b7b57 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ConflictManagerInternal.java @@ -169,7 +169,7 @@ public class ConflictManagerInternal { monitor.subTask("Creating and/or maintaining the Merge Branch"); IOseeBranch mergeBranch = - BranchManager.getOrCreateMergeBranch(sourceBranch, destinationBranch, new ArrayList<ArtifactId>(artIdSet)); + BranchManager.getOrCreateMergeBranch(sourceBranch, destinationBranch, new ArrayList<>(artIdSet)); if (mergeBranch == null) { throw new BranchMergeException("Could not create the Merge Branch."); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java index e87cc3b9e06..89768e78a1e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TransactionManager.java @@ -239,7 +239,7 @@ public final class TransactionManager { } public static Collection<TransactionRecord> getTransactions(Set<Long> ids) { - List<TransactionRecord> transactions = new LinkedList<TransactionRecord>(); + List<TransactionRecord> transactions = new LinkedList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { String query = String.format(SELECT_TRANSACTIONS_BY_IDS, @@ -344,7 +344,7 @@ public final class TransactionManager { } public static List<RelationRow> getRelationsFromArtifactAndTransaction(Artifact art, TransactionId trans) { - List<RelationRow> relationChanges = new LinkedList<RelationRow>(); + List<RelationRow> relationChanges = new LinkedList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(SELECT_RELATIONS_FROM_ART_IN_TRANS_ID, art.getBranch(), art, art, trans); @@ -359,7 +359,7 @@ public final class TransactionManager { } public static List<AttributeRow> getAttributesFromArtifactAndTransaction(Artifact art, TransactionId trans) { - List<AttributeRow> attributeChanges = new LinkedList<AttributeRow>(); + List<AttributeRow> attributeChanges = new LinkedList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(SELECT_ATTRIBUTES_FROM_ART_IN_TRANS_ID, art.getBranch(), art, trans); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCache.java index 281cbfe3fef..198605c12c2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/TxMonitorCache.java @@ -26,7 +26,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.TxMonitorImpl.Monitore public final class TxMonitorCache<K> { private final Map<K, Map<String, WeakReference<MonitoredTx>>> txMap = - new ConcurrentHashMap<K, Map<String, WeakReference<MonitoredTx>>>(); + new ConcurrentHashMap<>(); public boolean contains(K key) { return txMap.containsKey(key); @@ -42,7 +42,7 @@ public final class TxMonitorCache<K> { data = new ConcurrentHashMap<>(); txMap.put(key, data); } - data.put(tx.getUuid(), new WeakReference<MonitoredTx>(tx)); + data.put(tx.getUuid(), new WeakReference<>(tx)); manageReferences(); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ConvertOseeTypesToLong.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ConvertOseeTypesToLong.java index ef0c3d0a3a8..e1c97b3bbb7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ConvertOseeTypesToLong.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ConvertOseeTypesToLong.java @@ -108,7 +108,7 @@ public class ConvertOseeTypesToLong { } private static Map<String, Long> getHextToLong(Matcher matcher) { - Map<String, Long> hexToLong = new HashMap<String, Long>(); + Map<String, Long> hexToLong = new HashMap<>(); // can't change text while searching, so find them all first while (matcher.find()) { String hex = matcher.group(1); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/OseeInfo.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/OseeInfo.java index af555a3453c..cbad0b2e2ce 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/OseeInfo.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/OseeInfo.java @@ -82,6 +82,6 @@ public class OseeInfo { private static void cacheValue(String key, String value) { Long time = System.currentTimeMillis(); - cache.put(key, new Pair<Long, String>(time, value)); + cache.put(key, new Pair<>(time, value)); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java index 1185b5387f9..9759a2d131d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/validation/OseeValidator.java @@ -32,7 +32,7 @@ public class OseeValidator { private OseeValidator() { loadedObjects = - new ExtensionDefinedObjects<IOseeValidator>(EXTENSION_ID, EXTENSION_ELEMENT, CLASS_NAME_ATTRIBUTE); + new ExtensionDefinedObjects<>(EXTENSION_ID, EXTENSION_ELEMENT, CLASS_NAME_ATTRIBUTE); } public static OseeValidator getInstance() { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java index 4e56a2ec5f6..b5fb27353e4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/UpdateBookmarkIds.java @@ -10,13 +10,9 @@ *******************************************************************************/ package org.eclipse.osee.framework.skynet.core.word; -import java.io.StringWriter; import java.util.Collection; import java.util.HashMap; import java.util.Map; -import javax.xml.stream.XMLOutputFactory; -import javax.xml.stream.XMLStreamException; -import javax.xml.stream.XMLStreamWriter; import javax.xml.xpath.XPath; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.jdk.core.util.Strings; @@ -138,20 +134,4 @@ public class UpdateBookmarkIds { return bookMarkId; } - @SuppressWarnings("unused") - private static String xmlSectionToString(Node root) throws XMLStreamException { - StringWriter writer = new StringWriter(); - XMLOutputFactory factory = XMLOutputFactory.newInstance(); - XMLStreamWriter xmlWriter = null; - try { - xmlWriter = factory.createXMLStreamWriter(writer); - Jaxp.writeNode(xmlWriter, root, false); - } finally { - if (xmlWriter != null) { - xmlWriter.close(); - } - } - return writer.toString(); - } - } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java index 9c7747d8ab7..db899ab46f9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/word/WordUtil.java @@ -126,7 +126,7 @@ public class WordUtil { } else { content = new String(Streams.getByteArray(stream), "UTF-8"); } - values.add(new Pair<String, GammaId>(content, GammaId.valueOf(chStmt.getLong("gamma_id")))); + values.add(new Pair<>(content, GammaId.valueOf(chStmt.getLong("gamma_id")))); } catch (UnsupportedEncodingException ex) { // should never ever ever occur throw new IllegalStateException("Must support UTF-8 format"); diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/core/BranchGraphEditorInput.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/core/BranchGraphEditorInput.java index b12b63b715e..1e78f710727 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/core/BranchGraphEditorInput.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/core/BranchGraphEditorInput.java @@ -67,7 +67,7 @@ public class BranchGraphEditorInput implements IEditorInput, Adaptable { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((branch == null) ? 0 : branch.hashCode()); + result = prime * result + (branch == null ? 0 : branch.hashCode()); return result; } diff --git a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/Model.java b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/Model.java index e0b45dde839..434e3e90629 100644 --- a/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/Model.java +++ b/plugins/org.eclipse.osee.framework.ui.branch.graph/src/org/eclipse/osee/framework/ui/branch/graph/model/Model.java @@ -39,7 +39,7 @@ public class Model { } protected List<IModelListener> getListeners() { - return new ArrayList<IModelListener>(listeners); + return new ArrayList<>(listeners); } protected void fireModelEvent() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/util/JsonArtifactTransferTest.java b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/util/JsonArtifactTransferTest.java index 47efcfc9bd6..9f43b6ebb66 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/util/JsonArtifactTransferTest.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet.test/src/org/eclipse/osee/framework/ui/skynet/util/JsonArtifactTransferTest.java @@ -86,11 +86,11 @@ public class JsonArtifactTransferTest { private String generateJsonOutput() { String output = null; - List<JsonArtRep> outputItems = new ArrayList<JsonArtRep>(); + List<JsonArtRep> outputItems = new ArrayList<>(); for (int i = 0; i < 5; i++) { JsonArtRep rep = new JsonArtRep(); rep.setArtType(CoreArtifactTypes.SoftwareDesign); - List<JsonAttrRep> attrs = new ArrayList<JsonAttrRep>(); + List<JsonAttrRep> attrs = new ArrayList<>(); for (int j = 0; j < 5; j++) { JsonAttrRep attr = new JsonAttrRep(); attr.setType(CoreAttributeTypes.Active); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java index abee7c12df4..e97cf5f7dcf 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactDecorator.java @@ -56,7 +56,7 @@ import org.eclipse.ui.progress.UIJob; public class ArtifactDecorator implements IArtifactDecoratorPreferences { private static final Collection<WeakReference<ArtifactDecorator>> DECORATOR_INSTANCES = - new CopyOnWriteArrayList<WeakReference<ArtifactDecorator>>(); + new CopyOnWriteArrayList<>(); private DecoratorAction showArtIds; private DecoratorAction showArtType; @@ -416,7 +416,7 @@ public class ArtifactDecorator implements IArtifactDecoratorPreferences { } private static void addDecoratorInstance(ArtifactDecorator source) { - DECORATOR_INSTANCES.add(new WeakReference<ArtifactDecorator>(source)); + DECORATOR_INSTANCES.add(new WeakReference<>(source)); } private static void notifySettingsChanged(ArtifactDecorator source) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java index 5f2bd66dd75..acfa151394f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java @@ -47,10 +47,10 @@ public final class ArtifactImageManager { private static final String EXTENSION_ID = Activator.PLUGIN_ID + "." + EXTENSION_ELEMENT; private static final Map<IArtifactType, ArtifactImageProvider> providersOverrideImageMap = - new ConcurrentHashMap<IArtifactType, ArtifactImageProvider>(); + new ConcurrentHashMap<>(); private static final Map<IArtifactType, KeyedImage> artifactTypeImageMap = new ConcurrentHashMap<>(); private static final Map<IArtifactType, String> artifactTypeImageProviderMap = - new ConcurrentHashMap<IArtifactType, String>(); + new ConcurrentHashMap<>(); private static final String OSEE_DATABASE_PROVIDER = "OSEE Database Provider"; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java index e962e68a78d..dfbe03e098a 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/RelationsComposite.java @@ -287,7 +287,7 @@ public class RelationsComposite extends Composite implements ISelectedArtifact, public void widgetSelected(SelectionEvent e) { TreeViewerReport report = new TreeViewerReport("Relation View Report for " + artifact.getName(), treeViewer); - ArrayList<Integer> ignoreCols = new ArrayList<>(); + new ArrayList<>(); report.open(); } }); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java index c2c745fc064..6a84a5fb1d4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java @@ -93,7 +93,7 @@ public class ResServiceContributionItem extends OseeStatusContributionItem imple private static final class UpdateStatusTimerTask extends TimerTask { private final Set<OseeStatusContributionItem> itemsToUpdate = - new CopyOnWriteArraySet<OseeStatusContributionItem>(); + new CopyOnWriteArraySet<>(); public void addItem(OseeStatusContributionItem item) { itemsToUpdate.add(item); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/annotation/AttributeAnnotationManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/annotation/AttributeAnnotationManager.java index ed4e24c9474..fc743f953fb 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/annotation/AttributeAnnotationManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/annotation/AttributeAnnotationManager.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Attribute; public class AttributeAnnotationManager { private final Artifact artifact; private static Map<String, AttributeAnnotationManager> guidToManager = - new HashMap<String, AttributeAnnotationManager>(50); + new HashMap<>(50); public static AttributeAnnotationManager get(Artifact artifact) { if (!guidToManager.containsKey(artifact.getGuid())) { @@ -118,7 +118,7 @@ public class AttributeAnnotationManager { private static void ensureLoaded() { if (extensionDefinedObjects == null) { - extensionDefinedObjects = new ExtensionDefinedObjects<IArtifactAnnotation>( + extensionDefinedObjects = new ExtensionDefinedObjects<>( "org.eclipse.osee.framework.skynet.core.ArtifactAnnotation", "ArtifactAnnotation", "classname"); } } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorInput.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorInput.java index 7538a1eacac..70acb270727 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorInput.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorInput.java @@ -140,7 +140,7 @@ public class ArtifactEditorInput implements IEditorInput, IPersistableElement { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((getArtId() == null) ? 0 : getArtId().hashCode()); + result = prime * result + (getArtId() == null ? 0 : getArtId().hashCode()); result = prime * result + getBranchId().hashCode(); return result; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorProviders.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorProviders.java index 56b78524c75..e4d6a37898e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorProviders.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorProviders.java @@ -20,7 +20,7 @@ public final class ArtifactEditorProviders { public static Collection<IArtifactEditorProvider> getXWidgetProviders() { ExtensionDefinedObjects<IArtifactEditorProvider> contributions = - new ExtensionDefinedObjects<IArtifactEditorProvider>( + new ExtensionDefinedObjects<>( "org.eclipse.osee.framework.ui.skynet.ArtifactEditorProvider", "ArtifactEditorProvider", "classname", true); return contributions.getObjects(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java index 8581eafc73d..4b7317dd1f6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java @@ -38,7 +38,7 @@ public class BlamContributionManager implements IXNavigateCommonItem { public synchronized static Map<String, AbstractBlam> getBlamMap() { if (blams == null) { blams = new TreeMap<>(); - ExtensionDefinedObjects<AbstractBlam> definedObjects = new ExtensionDefinedObjects<AbstractBlam>( + ExtensionDefinedObjects<AbstractBlam> definedObjects = new ExtensionDefinedObjects<>( "org.eclipse.osee.framework.ui.skynet.BlamOperation", "Operation", "className"); for (AbstractBlam blam : definedObjects.getObjects()) { blams.put(blam.getName(), blam); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamParameter.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamParameter.java index d3084679287..4b5858c8017 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamParameter.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamParameter.java @@ -14,18 +14,8 @@ package org.eclipse.osee.framework.ui.skynet.blam; * @author Ryan D. Brooks */ public class BlamParameter { - @SuppressWarnings("unused") - private final String name; - @SuppressWarnings("unused") - private final Class<?> clazz; - @SuppressWarnings("unused") - private final String binding; - public BlamParameter(String name, Class<?> clazz, String binding) { super(); - this.name = name; - this.clazz = clazz; - this.binding = binding; } } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/VariableMap.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/VariableMap.java index 8c24f9b1dd2..b1a7b431d61 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/VariableMap.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/VariableMap.java @@ -73,9 +73,9 @@ public class VariableMap { public List<IArtifactType> getArtifactTypes(String parameterName) { Collection<IArtifactType> artTypes = getCollection(IArtifactType.class, parameterName); if (artTypes == null) { - return new ArrayList<IArtifactType>(); + return new ArrayList<>(); } - return new ArrayList<IArtifactType>(artTypes); + return new ArrayList<>(artTypes); } public Artifact getArtifact(String parameterName) { @@ -93,9 +93,9 @@ public class VariableMap { public List<AttributeType> getAttributeTypes(String parameterName) { Collection<AttributeType> attrTypes = getCollection(AttributeType.class, parameterName); if (attrTypes == null) { - return new ArrayList<AttributeType>(); + return new ArrayList<>(); } - return new ArrayList<AttributeType>(attrTypes); + return new ArrayList<>(attrTypes); } public String getString(String parameterName) { @@ -133,9 +133,9 @@ public class VariableMap { public List<Artifact> getArtifacts(String parameterName) { Collection<Artifact> artiafcts = getCollection(Artifact.class, parameterName); if (artiafcts == null) { - return new ArrayList<Artifact>(); + return new ArrayList<>(); } - return new ArrayList<Artifact>(artiafcts); + return new ArrayList<>(artiafcts); } private <T> T getSingleCollectionValue(Class<T> clazz, String parameterName) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/ViewApplicabilityUtil.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/ViewApplicabilityUtil.java index f4d1baca9cd..8c3115f7d61 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/ViewApplicabilityUtil.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/branch/ViewApplicabilityUtil.java @@ -100,7 +100,7 @@ public class ViewApplicabilityUtil { } public static Map<Long, String> getBranchViews(BranchId branch) { - Map<Long, String> viewsToBranchData = new HashMap<Long, String>(); + Map<Long, String> viewsToBranchData = new HashMap<>(); if (branch != null && branch.isValid()) { List<Artifact> branchViews = ArtifactQuery.getArtifactListFromType(BranchView, branch); for (Artifact art : branchViews) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java index ad203afe967..a60840a8cf9 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/BranchStateHealthCheck.java @@ -167,7 +167,7 @@ public class BranchStateHealthCheck extends DatabaseHealthOperation { } private Collection<BranchData> getAllBranchData() { - Map<Long, BranchData> data = new HashMap<Long, BranchData>(); + Map<Long, BranchData> data = new HashMap<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery("select * from osee_branch"); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseHealthOpsExtensionManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseHealthOpsExtensionManager.java index ecdf9b7d22e..09e2dba86ed 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseHealthOpsExtensionManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/DatabaseHealthOpsExtensionManager.java @@ -71,7 +71,7 @@ public class DatabaseHealthOpsExtensionManager { private static void checkExtensionsLoaded() { if (verifyOps.isEmpty() || fixOps.isEmpty()) { ExtensionDefinedObjects<DatabaseHealthOperation> extensionDefinedObjects = - new ExtensionDefinedObjects<DatabaseHealthOperation>(EXTENSION_POINT, EXTENSION_ELEMENT, + new ExtensionDefinedObjects<>(EXTENSION_POINT, EXTENSION_ELEMENT, CLASS_ATTRIBUTE_NAME); for (DatabaseHealthOperation operation : extensionDefinedObjects.getObjects()) { if (Strings.isValid(operation.getVerifyTaskName())) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java index 778faa51265..4a9d5ef9276 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/dbHealth/RelationIntegrityCheck.java @@ -334,13 +334,6 @@ public class RelationIntegrityCheck extends DatabaseHealthOperation { monitor.worked(calculateWork(0.10)); } - @SuppressWarnings("unused") - private void displayUnexpectedRelLinks(LocalRelationLink relationLink) { - log( - "gam_id \t transaction_id \t rel_link_id \t branch_d \t a_art_id \t b_art_id \t deleted_tran \t commit trans \t commit trans mod type"); - log(relationLink.toString()); - } - private boolean isLoadingBrokenRelationsNecessary() { return verify || isFirstRun(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java index c45ffac6c1e..18ec4d16468 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/explorer/menu/ArtifactExplorerMenu.java @@ -163,7 +163,7 @@ public class ArtifactExplorerMenu { boolean accessToRemoveLock = permiss.isAccessToRemoveLock(); lockMenuItem.setEnabled(isArtifact && writePermission && (!locked || accessToRemoveLock)); - createMenuItem.setEnabled((obj == null || isBranchEditable) || (isArtifact && writePermission || canModifyDH)); + createMenuItem.setEnabled(obj == null || isBranchEditable || isArtifact && writePermission || canModifyDH); if (obj == null) { createMenuItem.setText("New Parent"); } else if (isArtifact) { @@ -174,7 +174,7 @@ public class ArtifactExplorerMenu { copyMenuItem.setEnabled(isArtifact && permiss.isReadPermission()); boolean clipboardEmpty = artifactClipboard.isEmpty(); - boolean pasteEnabled = !clipboardEmpty && ((isArtifact && canModifyDH) || (obj == null && isBranchEditable)); + boolean pasteEnabled = !clipboardEmpty && (isArtifact && canModifyDH || obj == null && isBranchEditable); pasteMenuItem.setEnabled(pasteEnabled); pasteSpecialMenuItem.setEnabled(pasteEnabled); renameArtifactMenuItem.setEnabled(isArtifact && writePermission); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/internal/DslGrammarManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/internal/DslGrammarManager.java index bc4431569b7..ab85bc35ab3 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/internal/DslGrammarManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/internal/DslGrammarManager.java @@ -138,7 +138,7 @@ public final class DslGrammarManager { @Override public DslGrammarRegistry call() throws Exception { ExtensionDefinedObjects<DslGrammar> extensions = - new ExtensionDefinedObjects<DslGrammar>(EXTENSION_POINT_ID, EXTENSION_ELEMENT_NAME, EXTENSION_CLASS); + new ExtensionDefinedObjects<>(EXTENSION_POINT_ID, EXTENSION_ELEMENT_NAME, EXTENSION_CLASS); List<DslGrammar> grammars = extensions.getObjects(); ImmutableMap<String, DslGrammar> idToGrammar = @@ -159,7 +159,7 @@ public final class DslGrammarManager { } }; - return new FutureTask<DslGrammarRegistry>(callable); + return new FutureTask<>(callable); } } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/links/EditLinksNavigateItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/links/EditLinksNavigateItem.java index 36c1aca30d8..183b9078bdf 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/links/EditLinksNavigateItem.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/links/EditLinksNavigateItem.java @@ -86,7 +86,7 @@ public class EditLinksNavigateItem extends XNavigateItem implements FileChangedL } private String getFilename(boolean global) { - return String.format(LINKS_FILENAME, (global ? "Global" : "Personal")); + return String.format(LINKS_FILENAME, global ? "Global" : "Personal"); } private static final AtomicBoolean startedWatcher = new AtomicBoolean(false); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/links/LinkUtil.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/links/LinkUtil.java index 28f936370b5..56576cf15b4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/links/LinkUtil.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/links/LinkUtil.java @@ -149,8 +149,8 @@ public class LinkUtil { useArtifact.persist("Add web preferences links to " + useArtifact.toStringWithId()); TopicEvent event = - new TopicEvent((global ? FrameworkEvents.GLOBAL_WEB_PREFERENCES : FrameworkEvents.PERSONAL_WEB_PREFERENCES), - "links", webPrefs.getLinks().toString(), (global ? EventType.LocalAndRemote : EventType.LocalOnly)); + new TopicEvent(global ? FrameworkEvents.GLOBAL_WEB_PREFERENCES : FrameworkEvents.PERSONAL_WEB_PREFERENCES, + "links", webPrefs.getLinks().toString(), global ? EventType.LocalAndRemote : EventType.LocalOnly); OseeEventManager.kickTopicEvent(LinkUtil.class, event); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/SearchComposite.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/SearchComposite.java index 5b17619dcbc..06a276c4899 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/SearchComposite.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/panels/SearchComposite.java @@ -217,7 +217,7 @@ public class SearchComposite extends Composite implements Listener { private boolean isAttributeComposite() { Composite parent = getParent(); boolean isAttribute = - (parent != null && (parent instanceof Group) && ((Group) parent).getText().contains("Attribute")); + parent != null && parent instanceof Group && ((Group) parent).getText().contains("Attribute"); return isAttribute; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuis.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuis.java index cce75f55596..e06aa9ce6ac 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuis.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/ArtifactGuis.java @@ -46,7 +46,7 @@ public final class ArtifactGuis { Conditions.checkExpressionFailOnTrue(artifacts.isEmpty(), "Must have at least one artifact for checking"); StringBuilder message = new StringBuilder(); - Set<String> otherBranches = new HashSet<String>(); + Set<String> otherBranches = new HashSet<>(); int modifiedCount = artifactsDeleted(artifacts, otherBranches); if (modifiedCount > 0) { message.append(String.format(DELETE_EDIT_MESSAGE, modifiedCount, artifacts.size())); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java index bcf5dae2006..a7f75b3c303 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/RendererManager.java @@ -93,7 +93,7 @@ public final class RendererManager { private static void registerRendersFromExtensionPoints() { ExtensionDefinedObjects<IRenderer> contributions = - new ExtensionDefinedObjects<IRenderer>(Activator.PLUGIN_ID + ".ArtifactRenderer", "Renderer", "classname"); + new ExtensionDefinedObjects<>(Activator.PLUGIN_ID + ".ArtifactRenderer", "Renderer", "classname"); for (IRenderer renderer : contributions.getObjects()) { renderers.add(renderer); } @@ -164,14 +164,14 @@ public final class RendererManager { } public static HashCollection<IRenderer, Artifact> createRenderMap(PresentationType presentationType, Collection<Artifact> artifacts, Map<RendererOption, Object> rendererOptions) { - HashCollection<IRenderer, Artifact> prototypeRendererArtifactMap = new HashCollection<IRenderer, Artifact>(); + HashCollection<IRenderer, Artifact> prototypeRendererArtifactMap = new HashCollection<>(); for (Artifact artifact : artifacts) { IRenderer renderer = getBestRendererPrototype(presentationType, artifact, rendererOptions); prototypeRendererArtifactMap.put(renderer, artifact); } // now that the artifacts are grouped based on best renderer type, create instances of those renderer with the supplied options - HashCollection<IRenderer, Artifact> rendererArtifactMap = new HashCollection<IRenderer, Artifact>(); + HashCollection<IRenderer, Artifact> rendererArtifactMap = new HashCollection<>(); for (IRenderer prototypeRenderer : prototypeRendererArtifactMap.keySet()) { IRenderer renderer = prototypeRenderer.newInstance(rendererOptions); rendererArtifactMap.put(renderer, prototypeRendererArtifactMap.getValues(prototypeRenderer)); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordImageChecker.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordImageChecker.java index ac7e33b8e26..7aae38b39cd 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordImageChecker.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/WordImageChecker.java @@ -72,7 +72,7 @@ public class WordImageChecker { } } if (modified) { - return new Pair<String, Boolean>(originalValue, attrDirty); + return new Pair<>(originalValue, attrDirty); } } return null; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java index 1da344eff4b..381d41dd08b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/AbstractWordCompare.java @@ -68,7 +68,7 @@ public abstract class AbstractWordCompare implements IComparator { boolean show = !((boolean) renderer.getRendererOptionValue(RendererOption.NO_DISPLAY)); boolean executeVbScript = System.getProperty("os.name").contains("Windows"); boolean skipErrors = !((boolean) renderer.getRendererOptionValue(RendererOption.SKIP_ERRORS)); - skipDialogs = ((boolean) renderer.getRendererOptionValue(RendererOption.SKIP_DIALOGS)); + skipDialogs = (boolean) renderer.getRendererOptionValue(RendererOption.SKIP_DIALOGS); boolean diffFieldCodes = !UserManager.getBooleanSetting(MsWordPreferencePage.IGNORE_FIELD_CODE_CHANGES); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/ArtifactDeltaToFileConverter.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/ArtifactDeltaToFileConverter.java index 53363367233..e4dfc30bf36 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/ArtifactDeltaToFileConverter.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/compare/ArtifactDeltaToFileConverter.java @@ -46,7 +46,7 @@ public class ArtifactDeltaToFileConverter { IFile baseFile = renderer.renderToFile(baseArtifact, branch, presentationType); IFile newerFile = renderer.renderToFile(newerArtifact, branch, presentationType); - return new Pair<IFile, IFile>(baseFile, newerFile); + return new Pair<>(baseFile, newerFile); } public void convertToFileForMerge(final Collection<IFile> outputFiles, Artifact baseVersion, Artifact newerVersion) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java index 5292a0088e0..8e4d66517fa 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/render/word/WordTemplateProcessor.java @@ -427,7 +427,7 @@ public class WordTemplateProcessor { } private List<Artifact> parseOrcsQueryResult(String result, BranchId branch) { - ArrayList<Artifact> artifacts = new ArrayList<Artifact>(); + ArrayList<Artifact> artifacts = new ArrayList<>(); try { JSONObject jsonObject = new JSONObject(result); JSONArray results = jsonObject.getJSONArray("results"); @@ -565,16 +565,16 @@ public class WordTemplateProcessor { parseMetadataOptions(templateOptions); } - if (((boolean) renderer.getRendererOptionValue(RendererOption.PUBLISH_DIFF))) { + if ((boolean) renderer.getRendererOptionValue(RendererOption.PUBLISH_DIFF)) { WordTemplateFileDiffer templateFileDiffer = new WordTemplateFileDiffer(renderer); templateFileDiffer.generateFileDifferences(artifacts, "/results/", outlineNumber, outlineType, recurseChildren); } else { List<ArtifactId> allArtifacts = new ArrayList<>(); - if (recurseChildren || (((boolean) renderer.getRendererOptionValue( - RendererOption.RECURSE_ON_LOAD)) && !((boolean) renderer.getRendererOptionValue( - RendererOption.ORIG_PUBLISH_AS_DIFF)))) { + if (recurseChildren || (boolean) renderer.getRendererOptionValue( + RendererOption.RECURSE_ON_LOAD) && !((boolean) renderer.getRendererOptionValue( + RendererOption.ORIG_PUBLISH_AS_DIFF))) { for (Artifact art : artifacts) { allArtifacts.add(art); if (!art.isHistorical()) { @@ -621,7 +621,7 @@ public class WordTemplateProcessor { if (!processedArtifacts.contains(artifact)) { boolean ignoreArtifact = - (excludeFolders && artifact.isOfType(CoreArtifactTypes.Folder)) || artifactsToExclude.containsKey( + excludeFolders && artifact.isOfType(CoreArtifactTypes.Folder) || artifactsToExclude.containsKey( ArtifactId.valueOf(artifact.getId())); boolean ignoreArtType = excludeArtifactTypes != null && artifact.isOfType(excludeArtifactTypes); @@ -654,8 +654,8 @@ public class WordTemplateProcessor { startedSection = true; } - if (((boolean) renderer.getRendererOptionValue( - RendererOption.UPDATE_PARAGRAPH_NUMBERS)) && !publishInline) { + if ((boolean) renderer.getRendererOptionValue( + RendererOption.UPDATE_PARAGRAPH_NUMBERS) && !publishInline) { if (artifact.isAttributeTypeValid(CoreAttributeTypes.ParagraphNumber)) { artifact.setSoleAttributeValue(CoreAttributeTypes.ParagraphNumber, paragraphNumber.toString()); @@ -678,10 +678,10 @@ public class WordTemplateProcessor { } // Check for option that may have been set from Publish with Diff BLAM to recurse - boolean recurse = ((boolean) renderer.getRendererOptionValue(RendererOption.RECURSE_ON_LOAD)); - boolean origDiff = ((boolean) renderer.getRendererOptionValue(RendererOption.ORIG_PUBLISH_AS_DIFF)); + boolean recurse = (boolean) renderer.getRendererOptionValue(RendererOption.RECURSE_ON_LOAD); + boolean origDiff = (boolean) renderer.getRendererOptionValue(RendererOption.ORIG_PUBLISH_AS_DIFF); - if (recurseChildren && !recurse || (recurse && !origDiff)) { + if (recurseChildren && !recurse || recurse && !origDiff) { for (Artifact childArtifact : artifact.getChildren()) { processObjectArtifact(childArtifact, wordMl, outlineType, presentationType, data); } @@ -707,7 +707,7 @@ public class WordTemplateProcessor { for (AttributeElement attributeElement : attributeElements) { String attributeName = attributeElement.getAttributeName(); - if (((boolean) renderer.getRendererOptionValue(RendererOption.ALL_ATTRIBUTES)) || attributeName.equals("*")) { + if ((boolean) renderer.getRendererOptionValue(RendererOption.ALL_ATTRIBUTES) || attributeName.equals("*")) { for (AttributeTypeToken attributeType : RendererManager.getAttributeTypeOrderList(artifact)) { if (!outlining || attributeType.notEqual(headingAttributeType)) { processAttribute(artifact, wordMl, attributeElement, attributeType, true, presentationType, @@ -789,8 +789,8 @@ public class WordTemplateProcessor { } // Do not publish relation order during publishing - if (((boolean) renderer.getRendererOptionValue( - RendererOption.IN_PUBLISH_MODE)) && CoreAttributeTypes.RelationOrder.equals(attributeType)) { + if ((boolean) renderer.getRendererOptionValue( + RendererOption.IN_PUBLISH_MODE) && CoreAttributeTypes.RelationOrder.equals(attributeType)) { return; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/XResultDataUI.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/XResultDataUI.java index 1d14b7cb2bb..26c0eb9f76c 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/XResultDataUI.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/XResultDataUI.java @@ -170,7 +170,7 @@ public class XResultDataUI { public static void reportSevereLoggingMonitor(SevereLoggingMonitor monitorLog, XResultData rd) { List<IHealthStatus> stats = monitorLog.getAllLogs(); - for (IHealthStatus stat : new ArrayList<IHealthStatus>(stats)) { + for (IHealthStatus stat : new ArrayList<>(stats)) { if (stat.getException() != null) { rd.error("Exception: " + Lib.exceptionToString(stat.getException())); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java index 87c70a025d7..beaa7e16f85 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/table/ResultsEditorTableTab.java @@ -75,7 +75,7 @@ public class ResultsEditorTableTab implements IResultsEditorTableTab { this.xViewerFactory = new ResultsXViewerFactory(columns); this.contentProvider = contentProvider == null ? new ResultsXViewerContentProvider() : contentProvider; this.labelProvider = labelProvider; - this.listeners = listeners == null ? new ArrayList<IResultsEditorTableListener>() : listeners; + this.listeners = listeners == null ? new ArrayList<>() : listeners; } public ResultsEditorTableTab(String tabName) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java index 1ff89121d8f..c87473e34ff 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/ArtifactSearchPage.java @@ -458,7 +458,7 @@ public class ArtifactSearchPage extends DialogPage implements ISearchPage, IRepl clearAllLabel.addListener(SWT.MouseUp, new Listener() { @Override public void handleEvent(Event event) { - for (FilterModel filterModel : new CopyOnWriteArrayList<FilterModel>( + for (FilterModel filterModel : new CopyOnWriteArrayList<>( filterviewer.getFilterList().getFilters())) { filterviewer.removeFilter(filterModel); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java index 2e1c5937828..ff1a43dcb74 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java @@ -493,7 +493,7 @@ public class ArtifactSearchPage extends AbstractArtifactSearchViewPage implement @SuppressWarnings("rawtypes") @Override public List toList() { - return new ArrayList<Artifact>(collection); + return new ArrayList<>(collection); } } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java index 475029e8a6c..9e5585f77ac 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/skywalker/SkyWalkerOptions.java @@ -440,28 +440,28 @@ public final class SkyWalkerOptions { public Set<IArtifactType> getAllArtTypes() { if (artTypes == null) { - return new HashSet<IArtifactType>(); + return new HashSet<>(); } return artTypes.keySet(); } public Set<Object> getAllRelTypes() { if (relTypes == null) { - return new HashSet<Object>(); + return new HashSet<>(); } return relTypes.keySet(); } public Set<AttributeTypeToken> getAllShowAttributes() { if (showAttributes == null) { - return new HashSet<AttributeTypeToken>(); + return new HashSet<>(); } return showAttributes.keySet(); } public Set<RelationType> getAllRelationLinkDescriptorTypes() { if (relTypes == null) { - return new HashSet<RelationType>(); + return new HashSet<>(); } Set<RelationType> descs = new HashSet<>(); for (Object obj : relTypes.keySet()) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/TemplateManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/TemplateManager.java index 811960ac4cc..98685240a49 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/TemplateManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/templates/TemplateManager.java @@ -35,7 +35,7 @@ public class TemplateManager { private TemplateManager() { ExtensionDefinedObjects<ITemplateProvider> extensionDefinedObjects = - new ExtensionDefinedObjects<ITemplateProvider>(EXTENSION_ID, EXTENSION_ELEMENT, EXTENSION_CLASSNAME); + new ExtensionDefinedObjects<>(EXTENSION_ID, EXTENSION_ELEMENT, EXTENSION_CLASSNAME); templateProviders = extensionDefinedObjects.getObjects(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateViewItems.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateViewItems.java index 703daae59eb..aea04ca956b 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateViewItems.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateViewItems.java @@ -81,7 +81,7 @@ public class UserNavigateViewItems implements XNavigateViewItems, IXNavigateComm items.add(new XNavigateItemBlam(parentItem, new PopulateUserGroupBlam(), FrameworkImage.GROUP)); } - ExtensionDefinedObjects<IUserNavigateItem> objects = new ExtensionDefinedObjects<IUserNavigateItem>( + ExtensionDefinedObjects<IUserNavigateItem> objects = new ExtensionDefinedObjects<>( "org.eclipse.osee.framework.ui.skynet.UserNavigateItem", "UserNavigateItem", "classname"); for (IUserNavigateItem newItem : objects.getObjects()) { for (XNavigateItem item : newItem.getNavigateItems(parentItem)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/OseeDictionary.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/OseeDictionary.java index 346a5bb2c16..d8c2f7ebbf6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/OseeDictionary.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/OseeDictionary.java @@ -47,7 +47,7 @@ public final class OseeDictionary { private static final Pattern pattern = Pattern.compile("^[a-zA-Z]{1}[a-z]+$"); private final ExtensionDefinedObjects<IOseeDictionary> contributions = - new ExtensionDefinedObjects<IOseeDictionary>("org.eclipse.osee.framework.ui.skynet.OseeDictionary", + new ExtensionDefinedObjects<>("org.eclipse.osee.framework.ui.skynet.OseeDictionary", "OseeDictionary", "classname"); public Iterable<IOseeDictionary> getDictionaries() { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/SelectionProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/SelectionProvider.java index 06ef55f9d46..9480b487856 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/SelectionProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/util/SelectionProvider.java @@ -21,7 +21,7 @@ public class SelectionProvider implements ISelectionProvider { private ISelection selection; public SelectionProvider() { - this.listenerList = new ListenerList<ISelectionChangedListener>(); + this.listenerList = new ListenerList<>(); } @Override diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelection.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelection.java index fdacf4a611d..4784b2eb3c4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelection.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XHyperlabelMemberSelection.java @@ -71,7 +71,7 @@ public class XHyperlabelMemberSelection extends XHyperlinkLabelCmdValueSelection @Override public boolean handleSelection() { try { - FilteredCheckboxTreeDialog<User> uld = new FilteredCheckboxTreeDialog<User>("Select Users", + FilteredCheckboxTreeDialog<User> uld = new FilteredCheckboxTreeDialog<>("Select Users", "Select to assign.\nDeSelect to un-assign.", users, new ArrayTreeContentProvider(), new ArtifactLabelProvider(), new UserIdSorter(selectedUsers, teamMembers)); uld.setInitialSelections(selectedUsers); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XMembersCombo.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XMembersCombo.java index f2e39ef4a2b..4320a5e6582 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XMembersCombo.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XMembersCombo.java @@ -65,7 +65,7 @@ public class XMembersCombo extends GenericXWidget { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + ((selectedUser == null) ? 0 : selectedUser.hashCode()); + result = prime * result + (selectedUser == null ? 0 : selectedUser.hashCode()); return result; } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XRadionButtonsBooleanDam.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XRadionButtonsBooleanDam.java index c8c5b5f74f0..09166df8355 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XRadionButtonsBooleanDam.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XRadionButtonsBooleanDam.java @@ -95,8 +95,8 @@ public class XRadionButtonsBooleanDam extends XRadionButtonsDam { public Result isDirty() { Boolean stored = getStored(); Boolean selected = getSelected(); - if ((stored != null && !stored.equals(selected)) || // - (selected != null && !selected.equals(stored))) { + if (stored != null && !stored.equals(selected) || // + selected != null && !selected.equals(stored)) { return new Result(true, String.format("Attribute Type [%s] dirty", getAttributeType())); } return Result.FalseResult; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java index c7cd4292152..0e2574f45d7 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/XSelectFromDialog.java @@ -141,7 +141,7 @@ public abstract class XSelectFromDialog<T> extends XText { } public List<T> getSelectableItems() { - return new ArrayList<T>(input); + return new ArrayList<>(input); } public void setSelected(Collection<T> input) { @@ -151,7 +151,7 @@ public abstract class XSelectFromDialog<T> extends XText { } public List<T> getSelected() { - return new ArrayList<T>(selected); + return new ArrayList<>(selected); } public abstract FilteredCheckboxTreeDialog createDialog(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateFilteredTreeDialog.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateFilteredTreeDialog.java index 4411bce3e43..cf56ecbafcb 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateFilteredTreeDialog.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateFilteredTreeDialog.java @@ -127,7 +127,7 @@ public class CheckBoxStateFilteredTreeDialog<T> extends MessageDialog { comp.setLayoutData(new GridData(GridData.FILL_BOTH)); treeViewer = - new CheckBoxStateFilteredTreeViewer<T>(comp, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); + new CheckBoxStateFilteredTreeViewer<>(comp, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); gd.heightHint = 500; treeViewer.getViewer().getTree().setLayoutData(gd); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateFilteredTreeViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateFilteredTreeViewer.java index dc2b7263ae0..fca1fd8254e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateFilteredTreeViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateFilteredTreeViewer.java @@ -33,8 +33,8 @@ import org.eclipse.ui.dialogs.PatternFilter; public class CheckBoxStateFilteredTreeViewer<T> extends FilteredTree implements ICheckBoxStateTreeViewer { private final List<ICheckBoxStateTreeListener> listeners = new ArrayList<>(); - private final Set<T> checked = new HashSet<T>(); - private final Set<T> disabled = new HashSet<T>(); + private final Set<T> checked = new HashSet<>(); + private final Set<T> disabled = new HashSet<>(); private IsEnabled enabledChecker = null; public CheckBoxStateFilteredTreeViewer(Composite parent, int style) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateTreeViewer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateTreeViewer.java index 2122d9ecc61..9ab137615a4 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateTreeViewer.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateTreeViewer.java @@ -31,8 +31,8 @@ import org.eclipse.swt.widgets.Composite; public class CheckBoxStateTreeViewer<T> extends TreeViewer implements ICheckBoxStateTreeViewer { private final List<ICheckBoxStateTreeListener> listeners = new ArrayList<>(); - private final Map<T, Boolean> checked = new HashMap<T, Boolean>(); - private final Map<T, Boolean> enabled = new HashMap<T, Boolean>(); + private final Map<T, Boolean> checked = new HashMap<>(); + private final Map<T, Boolean> enabled = new HashMap<>(); public CheckBoxStateTreeViewer(Composite parent, int style) { super(parent, style); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateTreeViewerExample.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateTreeViewerExample.java index 8aa601db857..39c4bf3e2eb 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateTreeViewerExample.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/CheckBoxStateTreeViewerExample.java @@ -60,7 +60,7 @@ public class CheckBoxStateTreeViewerExample { gd.horizontalSpan = 2; toolBarComposite.setLayoutData(gd); - treeViewer = new CheckBoxStateTreeViewer<ExampleTreeNode>(Shell_1, SWT.MULTI | SWT.BORDER); + treeViewer = new CheckBoxStateTreeViewer<>(Shell_1, SWT.MULTI | SWT.BORDER); treeViewer.getTree().setLayoutData(new GridData(GridData.FILL_VERTICAL)); treeViewer.setContentProvider(new ExampleCheckBoxStateTreeContentProvider()); treeViewer.setLabelProvider(new CheckBoxStateTreeLabelProvider(treeViewer)); @@ -77,7 +77,7 @@ public class CheckBoxStateTreeViewerExample { createTaskActionBar(toolBarComposite); - List<Object> tasks = new ArrayList<Object>(); + List<Object> tasks = new ArrayList<>(); for (int x = 0; x < 1; x++) { tasks.addAll(getTestTasks(treeViewer)); } @@ -123,7 +123,7 @@ public class CheckBoxStateTreeViewerExample { deSelectAll.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - List<Object> tasks = new ArrayList<Object>(); + List<Object> tasks = new ArrayList<>(); for (int x = 0; x < 1; x++) { tasks.addAll(getTestTasks(treeViewer)); } @@ -137,7 +137,7 @@ public class CheckBoxStateTreeViewerExample { refreshItem.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - List<Object> tasks = new ArrayList<Object>(); + List<Object> tasks = new ArrayList<>(); for (int x = 0; x < 1; x++) { tasks.addAll(getTestTasks(treeViewer)); } @@ -156,7 +156,7 @@ public class CheckBoxStateTreeViewerExample { } private static List<ExampleTreeNode> getTestTasks(ICheckBoxStateTreeViewer treeViewer) { - List<ExampleTreeNode> tasks = new ArrayList<ExampleTreeNode>(); + List<ExampleTreeNode> tasks = new ArrayList<>(); ExampleTreeNode task = new ExampleTreeNode("Trees", null, true, treeViewer); tasks.add(task); for (String str : Arrays.asList("Pine", "Redwood", "Oak")) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/images/CheckBoxStateImageCache.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/images/CheckBoxStateImageCache.java index 55f50dde0bb..ea99edfb8c5 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/images/CheckBoxStateImageCache.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/checkbox/images/CheckBoxStateImageCache.java @@ -21,8 +21,8 @@ import org.eclipse.swt.graphics.Image; */ public class CheckBoxStateImageCache { - static Map<String, Image> imageCache = new HashMap<String, Image>(); - static Map<String, ImageDescriptor> imageDescriptorCache = new HashMap<String, ImageDescriptor>(); + static Map<String, Image> imageCache = new HashMap<>(); + static Map<String, ImageDescriptor> imageDescriptorCache = new HashMap<>(); public static Image getImage(String imageName) { if (!imageCache.containsKey(imageName)) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTree.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTree.java index ade953c94ca..3e7995b83d5 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTree.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/dialog/FilteredCheckboxTree.java @@ -361,7 +361,7 @@ public class FilteredCheckboxTree extends FilteredTree { @Override public void setCheckedElements(Object[] elements) { Set<Object> s = new HashSet<>(itemCache.keySet()); - s.removeAll(new HashSet<Object>(Arrays.asList(elements))); + s.removeAll(new HashSet<>(Arrays.asList(elements))); for (int i = 0; i < elements.length; i++) { Object element = elements[i]; FilteredCheckboxTreeItem item = itemCache.get(element); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/AttributeXWidgetManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/AttributeXWidgetManager.java index 0fb4c1843d4..94d3669437f 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/AttributeXWidgetManager.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/AttributeXWidgetManager.java @@ -28,7 +28,7 @@ public class AttributeXWidgetManager { private final ExtensionDefinedObjects<IAttributeXWidgetProvider> extensionObjects; private AttributeXWidgetManager() { - this.extensionObjects = new ExtensionDefinedObjects<IAttributeXWidgetProvider>(EXTENSION_POINT, EXTENSION_NAME, + this.extensionObjects = new ExtensionDefinedObjects<>(EXTENSION_POINT, EXTENSION_NAME, CLASS_NAME_ATTRIBUTE, true); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java index 1155abaf096..fb0fdfb4168 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/util/FrameworkXWidgetProvider.java @@ -483,7 +483,7 @@ public final class FrameworkXWidgetProvider { } private static Collection<IXWidgetProvider> getXWidgetProviders() { - ExtensionDefinedObjects<IXWidgetProvider> contributions = new ExtensionDefinedObjects<IXWidgetProvider>( + ExtensionDefinedObjects<IXWidgetProvider> contributions = new ExtensionDefinedObjects<>( Activator.PLUGIN_ID + ".XWidgetProvider", "XWidgetProvider", "classname", true); return contributions.getObjects(); } diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryTransactionCache.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryTransactionCache.java index 3db42f25c82..2e65a18b0b6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryTransactionCache.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryTransactionCache.java @@ -19,7 +19,7 @@ import org.eclipse.osee.framework.core.model.TransactionRecord; */ public class HistoryTransactionCache implements IHistoryTransactionProvider { - private final Map<Long, TransactionRecord> txIdToTransRecord = new HashMap<Long, TransactionRecord>(500); + private final Map<Long, TransactionRecord> txIdToTransRecord = new HashMap<>(500); public Map<Long, TransactionRecord> getTxIdToTransRecord() { return txIdToTransRecord; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryLabelProvider.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryLabelProvider.java index 2c3bf7558b3..6064d89d26e 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryLabelProvider.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/XHistoryLabelProvider.java @@ -38,7 +38,7 @@ public class XHistoryLabelProvider extends XViewerLabelProvider { private final HistoryXViewer historyXViewer; private static Color lightGreyColor; - private final Map<Object, Image> objectToImage = new HashMap<Object, Image>(500); + private final Map<Object, Image> objectToImage = new HashMap<>(500); private static Image transactionImage = null; public XHistoryLabelProvider(HistoryXViewer historyXViewer) { diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/column/HistoryTransactionAuthorColumn.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/column/HistoryTransactionAuthorColumn.java index 4e23ef4903a..94c0e7c36c7 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/column/HistoryTransactionAuthorColumn.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/column/HistoryTransactionAuthorColumn.java @@ -26,7 +26,7 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xHistory.IHistoryTransaction public class HistoryTransactionAuthorColumn extends AbstractTransactionColumn { // Cache to quickly get author so don't need to load from UserManager - private final Map<Long, String> transIdToAuthor = new HashMap<Long, String>(); + private final Map<Long, String> transIdToAuthor = new HashMap<>(); public HistoryTransactionAuthorColumn(IHistoryTransactionProvider txCache) { super(txCache, "framework.history.author", "Author", 100, XViewerAlign.Left, true, SortDataType.String, false, diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/column/HistoryTransactionDateColumn.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/column/HistoryTransactionDateColumn.java index efbdfdbda74..97428e6baf6 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/column/HistoryTransactionDateColumn.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/column/HistoryTransactionDateColumn.java @@ -28,8 +28,8 @@ public class HistoryTransactionDateColumn extends AbstractTransactionColumn { public static final String ID = "framework.history.timeStamp"; // Cache to quickly get author so don't need to load from UserManager - private final Map<Long, String> transIdToDateStr = new HashMap<Long, String>(); - private final Map<Long, Date> transIdToDate = new HashMap<Long, Date>(); + private final Map<Long, String> transIdToDateStr = new HashMap<>(); + private final Map<Long, Date> transIdToDate = new HashMap<>(); public HistoryTransactionDateColumn(IHistoryTransactionProvider txCache) { super(txCache, ID, "Time Stamp", 110, XViewerAlign.Left, true, SortDataType.Date, false, null); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/DiffHandler.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/DiffHandler.java index 88ce078bd6e..e620233bf89 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/DiffHandler.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/DiffHandler.java @@ -18,7 +18,6 @@ import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.osee.framework.jdk.core.type.OseeCoreException; import org.eclipse.osee.framework.logging.OseeLevel; import org.eclipse.osee.framework.logging.OseeLog; -import org.eclipse.osee.framework.skynet.core.artifact.Artifact; import org.eclipse.osee.framework.skynet.core.conflict.ArtifactConflict; import org.eclipse.osee.framework.skynet.core.conflict.AttributeConflict; import org.eclipse.osee.framework.skynet.core.conflict.Conflict; @@ -30,8 +29,6 @@ class DiffHandler extends AbstractSelectionEnabledHandler { private final int diffToShow; private AttributeConflict attributeConflict; private ArtifactConflict artifactConflict; - private List<Artifact> artifacts; - public DiffHandler(MenuManager menuManager, int diffToShow, MergeXWidget mergeXWidget) { super(menuManager); this.diffToShow = diffToShow; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java index 403a7185b8e..c2404f423bc 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java @@ -100,7 +100,7 @@ public class MergeView extends GenericViewPart implements IBranchEventListener, IWorkbenchPage page = AWorkbench.getActivePage(); IViewPart viewPart = page.showView(MergeView.VIEW_ID, String.valueOf( - sourceBranch != null ? (sourceBranch.getId() / 2) + (destBranch.getId() / 2) : commitTrans.getId()), + sourceBranch != null ? sourceBranch.getId() / 2 + destBranch.getId() / 2 : commitTrans.getId()), IWorkbenchPage.VIEW_ACTIVATE); if (viewPart instanceof MergeView) { MergeView mergeView = (MergeView) viewPart; diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java index f06e0d616e2..b9390a6c352 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeXWidget.java @@ -463,8 +463,8 @@ public class MergeXWidget extends GenericXWidget implements IOseeTreeReportProvi extraInfoLabel.setText(displayLabelText + CONFLICTS_RESOLVED); } else { String message = String.format("%s\nConflicts : %s <=> Resolved : %s%s", displayLabelText, - (storedConflicts.length - informational), resolved, - (informational == 0 ? " " : "\nInformational Conflicts : " + informational)); + storedConflicts.length - informational, resolved, + informational == 0 ? " " : "\nInformational Conflicts : " + informational); extraInfoLabel.setText(message); } } @@ -487,7 +487,7 @@ public class MergeXWidget extends GenericXWidget implements IOseeTreeReportProvi } private void checkForCompleteCommit() { - boolean isVisible = !hasMergeBranchBeenCommitted() && areAllConflictsResolved() && (getConflicts().length > 0); + boolean isVisible = !hasMergeBranchBeenCommitted() && areAllConflictsResolved() && getConflicts().length > 0; if (null != sourceBranch) { try { boolean rebase = BranchManager.getState(sourceBranch).isRebaselineInProgress(); @@ -495,7 +495,7 @@ public class MergeXWidget extends GenericXWidget implements IOseeTreeReportProvi rebase && BranchManager.isParent(sourceBranch, BranchManager.getParentBranch(destBranch)); boolean isValidCommit = BranchManager.hasMergeBranches(sourceBranch) && !rebase; - isVisible &= (isValidUpdate || isValidCommit); + isVisible &= isValidUpdate || isValidCommit; } catch (OseeCoreException ex) { OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex); isVisible = false; @@ -538,7 +538,7 @@ public class MergeXWidget extends GenericXWidget implements IOseeTreeReportProvi ConflictManagerExternal conflictManager = new ConflictManagerExternal(destBranch, sourceBranch); IOperation operation = new FinishUpdateBranchOperation(conflictManager, true, false); Operations.executeAsJob(operation, true); - } else if ((BranchManager.hasMergeBranches(sourceBranch) && !rebase)) { + } else if (BranchManager.hasMergeBranches(sourceBranch) && !rebase) { Artifact art = BranchManager.getAssociatedArtifact(sourceBranch); IOseeCmService cm = ServiceUtil.getOseeCmService(); diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java index 91bf152ef5c..0f4f0dca462 100644 --- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java +++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xviewer/skynet/SkynetXViewerFactory.java @@ -96,7 +96,7 @@ public class SkynetXViewerFactory extends XViewerFactory { public static List<XViewerColumn> getAllAttributeColumns() { if (attrColumns == null) { - attrColumns = new LinkedList<XViewerColumn>(); + attrColumns = new LinkedList<>(); for (AttributeType attributeType : AttributeTypeManager.getAllTypes()) { attrColumns.add(getAttributeColumn(attributeType)); } diff --git a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/DynamicWizard.java b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/DynamicWizard.java index a33524f737e..410c0ca9319 100644 --- a/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/DynamicWizard.java +++ b/plugins/org.eclipse.osee.framework.ui.swt/src/org/eclipse/osee/framework/ui/swt/DynamicWizard.java @@ -38,7 +38,7 @@ public abstract class DynamicWizard implements IWizard { */ static { - JFaceResources.getImageRegistry().put(DEFAULT_IMAGE, ImageManager.getImage(FrameworkUiImage.PAGE));//$NON-NLS-1$ + JFaceResources.getImageRegistry().put(DEFAULT_IMAGE, ImageManager.getImage(FrameworkUiImage.PAGE)); } /** diff --git a/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AJavaProject.java b/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AJavaProject.java index dee193a2725..a4505613df9 100644 --- a/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AJavaProject.java +++ b/plugins/org.eclipse.osee.framework.ui.ws/src/org/eclipse/osee/framework/ui/ws/AJavaProject.java @@ -29,7 +29,7 @@ import org.eclipse.osee.framework.jdk.core.util.Lib; public final class AJavaProject { private static final Map<IJavaProject, IClasspathEntry[]> cachedPath = - new HashMap<IJavaProject, IClasspathEntry[]>(); + new HashMap<>(); private static final Pattern JAVA_PACKAGE_PATTERN = Pattern.compile(".*?package\\s*(.*?);.*", Pattern.DOTALL); private static final Matcher JAVA_PACKAGE_MATCHER = JAVA_PACKAGE_PATTERN.matcher(""); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsDynamicServiceManager.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsDynamicServiceManager.java index 9dcb4116be7..5bf080b33db 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsDynamicServiceManager.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/JaxRsDynamicServiceManager.java @@ -25,7 +25,7 @@ public abstract class JaxRsDynamicServiceManager<T> { private final List<ServiceReference<T>> pendingReg = new ArrayList<>(); private final AtomicReference<JaxRsApplicationRegistry> registryRef = - new AtomicReference<JaxRsApplicationRegistry>(); + new AtomicReference<>(); public void setJaxRsApplicationRegistry(JaxRsApplicationRegistry registry) { registryRef.set(registry); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsApplicationContainer.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsApplicationContainer.java index e2e42efc812..0456b8aee5b 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsApplicationContainer.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/AbstractJaxRsApplicationContainer.java @@ -26,7 +26,7 @@ import org.osgi.framework.Bundle; public abstract class AbstractJaxRsApplicationContainer implements JaxRsVisitable { private final Map<String, JaxRsApplicationEntry> applications = - new ConcurrentHashMap<String, JaxRsApplicationEntry>(); + new ConcurrentHashMap<>(); private final String applicationContext; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/JaxRsApplicationRegistry.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/JaxRsApplicationRegistry.java index 76de8fbb3ef..387ac156820 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/JaxRsApplicationRegistry.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/JaxRsApplicationRegistry.java @@ -60,7 +60,7 @@ public class JaxRsApplicationRegistry implements JaxRsVisitable { } private final ConcurrentHashMap<String, JaxRsContainerProvider> servlets = - new ConcurrentHashMap<String, JaxRsContainerProvider>(); + new ConcurrentHashMap<>(); private Log logger; private JaxRsFactory factory; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/JaxRsContainerProviderImpl.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/JaxRsContainerProviderImpl.java index 9724a4e966a..dcca835f34e 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/JaxRsContainerProviderImpl.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/JaxRsContainerProviderImpl.java @@ -33,7 +33,7 @@ public final class JaxRsContainerProviderImpl extends LazyObject<JaxRsContainer> @Override protected FutureTask<JaxRsContainer> createLoaderTask() { - return new FutureTask<JaxRsApplicationRegistry.JaxRsContainer>(new Callable<JaxRsContainer>() { + return new FutureTask<>(new Callable<JaxRsContainer>() { @Override public JaxRsContainer call() throws Exception { container = factory.newJaxRsContainer(contextName); diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/OseeRootApplication.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/OseeRootApplication.java index 649dd6c75a7..6a973b2f5e0 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/OseeRootApplication.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/applications/OseeRootApplication.java @@ -22,7 +22,7 @@ import org.eclipse.osee.logger.Log; @ApplicationPath("/") public class OseeRootApplication extends Application { - private final Set<Object> singletons = new HashSet<Object>(); + private final Set<Object> singletons = new HashSet<>(); private Log logger; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/mvc/ViewModelWriter.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/mvc/ViewModelWriter.java index 9de67a67b00..29ecfb8f90c 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/mvc/ViewModelWriter.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/mvc/ViewModelWriter.java @@ -43,7 +43,7 @@ import org.osgi.framework.ServiceReference; public class ViewModelWriter implements MessageBodyWriter<ViewModel> { private final ConcurrentHashMap<String, ViewResolver<?>> resolvers = - new ConcurrentHashMap<String, ViewResolver<?>>(); + new ConcurrentHashMap<>(); @Context private ResourceInfo resourceInfo; diff --git a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/resources/JaxRsHtmlWadlGenerator.java b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/resources/JaxRsHtmlWadlGenerator.java index f7b691705f8..082287d3b9f 100644 --- a/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/resources/JaxRsHtmlWadlGenerator.java +++ b/plugins/org.eclipse.osee.jaxrs.server/src/org/eclipse/osee/jaxrs/server/internal/resources/JaxRsHtmlWadlGenerator.java @@ -47,8 +47,6 @@ public class JaxRsHtmlWadlGenerator extends WadlGenerator { private static final String WADL_TRANSFORMED_FLAG = "was.wadl.transformed"; private Log logger; - private BundleContext bundleContext; - //@formatter:off private @Context HttpHeaders headers; //@formatter:on @@ -58,11 +56,9 @@ public class JaxRsHtmlWadlGenerator extends WadlGenerator { } public void start(BundleContext bundleContext, Map<String, Object> props) { - this.bundleContext = bundleContext; } public void stop() { - this.bundleContext = null; } @Override diff --git a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JacksonFeature.java b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JacksonFeature.java index 28b1a95ade1..288a71de2f7 100644 --- a/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JacksonFeature.java +++ b/plugins/org.eclipse.osee.jaxrs/src/org/eclipse/osee/jaxrs/JacksonFeature.java @@ -132,7 +132,7 @@ public class JacksonFeature implements Feature { SimpleModule module = new SimpleModule("OSEE", new Version(1, 0, 0, "")); module.addDeserializer(ApplicabilityToken.class, - new NamedIdDeserializer<ApplicabilityToken>(ApplicabilityToken::create)); + new NamedIdDeserializer<>(ApplicabilityToken::create)); module.addDeserializer(ArtifactToken.class, new NamedIdDeserializer<ArtifactToken>(ArtifactToken::valueOf)); module.addDeserializer(ArtifactId.class, new IdDeserializer<ArtifactId>(ArtifactId::valueOf)); module.addDeserializer(TransactionToken.class, new TransactionTokenDeserializer()); diff --git a/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactoryTest.java b/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactoryTest.java index 87a3e874227..fced0fde71c 100644 --- a/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactoryTest.java +++ b/plugins/org.eclipse.osee.jdbc.test/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactoryTest.java @@ -244,7 +244,7 @@ public class JdbcComponentFactoryTest { } private Set<String> set(String... vals) { - return new TreeSet<String>(Arrays.asList(vals)); + return new TreeSet<>(Arrays.asList(vals)); } private Map<String, Object> asConfig(String... configs) { diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcClientImpl.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcClientImpl.java index 3c2f0b14e8f..789ca427bf3 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcClientImpl.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/JdbcClientImpl.java @@ -515,7 +515,7 @@ public final class JdbcClientImpl implements JdbcClient { connect = getConnection(); autoClose = true; } else { - connect = ((JdbcConnectionImpl) connection); + connect = (JdbcConnectionImpl) connection; } PreparedStatement preparedStatement = connect.prepareStatement(query); diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PoolFactory.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PoolFactory.java index 50ee2ff9cf7..76badc03327 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PoolFactory.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PoolFactory.java @@ -104,7 +104,7 @@ public class PoolFactory { return driver; } }; - return new FutureTask<PoolingDriver>(callable); + return new FutureTask<>(callable); } } } diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PooledConnectionProvider.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PooledConnectionProvider.java index 0416f4f32ba..aa7d480b57f 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PooledConnectionProvider.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/PooledConnectionProvider.java @@ -25,7 +25,7 @@ import org.eclipse.osee.jdbc.JdbcException; public class PooledConnectionProvider implements JdbcConnectionProvider { private final ConcurrentHashMap<String, LazyObject<DataSource>> dataSourceCache = - new ConcurrentHashMap<String, LazyObject<DataSource>>(); + new ConcurrentHashMap<>(); private final PoolFactory poolFactory; @@ -50,7 +50,7 @@ public class PooledConnectionProvider implements JdbcConnectionProvider { @Override protected FutureTask<DataSource> createLoaderTask() { Callable<DataSource> newCallable = poolFactory.createDataSourceFetcher(dbInfo); - return new FutureTask<DataSource>(newCallable); + return new FutureTask<>(newCallable); } }; provider = dataSourceCache.putIfAbsent(poolId, newProvider); diff --git a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactory.java b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactory.java index 29d9682ff25..625a7591a5c 100644 --- a/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactory.java +++ b/plugins/org.eclipse.osee.jdbc/src/org/eclipse/osee/jdbc/internal/osgi/JdbcComponentFactory.java @@ -26,7 +26,7 @@ import org.osgi.service.component.ComponentInstance; public class JdbcComponentFactory { private final ConcurrentHashMap<String, JdbcServiceComponent> services = - new ConcurrentHashMap<String, JdbcServiceComponent>(); + new ConcurrentHashMap<>(); private JdbcServiceConfigParser parser; diff --git a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorageProvider.java b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorageProvider.java index d8e7a4ff5d9..8d218cf9e0c 100644 --- a/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorageProvider.java +++ b/plugins/org.eclipse.osee.orcs.account.admin/src/org/eclipse/osee/orcs/account/admin/internal/oauth/ClientStorageProvider.java @@ -74,7 +74,7 @@ public class ClientStorageProvider extends LazyObject<ClientStorage> { } }; - return new FutureTask<ClientStorage>(callable); + return new FutureTask<>(callable); } private InputSupplier<InputStream> newTypesSupplier() { diff --git a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactoryTest.java b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactoryTest.java index 923b2b9f32a..84a7cd213d2 100644 --- a/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactoryTest.java +++ b/plugins/org.eclipse.osee.orcs.core.test/src/org/eclipse/osee/orcs/core/internal/attribute/AttributeFactoryTest.java @@ -94,8 +94,8 @@ public class AttributeFactoryTest { when(attributeData.getVersion()).thenReturn(attrVersionData); when(artifactData.getVersion()).thenReturn(artVersionData); - ArgumentCaptor<ResourceNameResolver> resolverCapture = ArgumentCaptor.forClass(ResourceNameResolver.class); - ArgumentCaptor<WeakReference> refCapture = ArgumentCaptor.forClass(WeakReference.class); + ArgumentCaptor.forClass(ResourceNameResolver.class); + ArgumentCaptor.forClass(WeakReference.class); Attribute<Object> actual = factory.createAttributeWithDefaults(container, artifactData, attributeType); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/CharacterDataProxy.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/CharacterDataProxy.java index e96e46f13a0..b8a69c6f114 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/CharacterDataProxy.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/ds/CharacterDataProxy.java @@ -21,5 +21,6 @@ public interface CharacterDataProxy<T> extends DataProxy<T> { public boolean setValue(T value); + @Override public String getStorageString(); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsApiImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsApiImpl.java index 980477158cb..531d851d227 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsApiImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/OrcsApiImpl.java @@ -117,7 +117,7 @@ public class OrcsApiImpl implements OrcsApi { BranchHierarchyProvider hierarchyProvider = new BranchHierarchyProvider() { private final ThreadLocal<Iterable<? extends BranchId>> cache = - new ThreadLocal<Iterable<? extends BranchId>>(); + new ThreadLocal<>(); @Override public Iterable<? extends BranchId> getParentHierarchy(BranchId branch) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/SystemPreferencesImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/SystemPreferencesImpl.java index b700af4ec73..b3a7810ae9b 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/SystemPreferencesImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/SystemPreferencesImpl.java @@ -134,7 +134,7 @@ public class SystemPreferencesImpl implements SystemPreferences { private static void cacheValue(String key, String value) { Long time = System.currentTimeMillis(); - cache.put(key, new Pair<Long, String>(time, value)); + cache.put(key, new Pair<>(time, value)); } } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/applicability/OrcsApplicabilityOps.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/applicability/OrcsApplicabilityOps.java index 3a57f206184..0d992e2792f 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/applicability/OrcsApplicabilityOps.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/applicability/OrcsApplicabilityOps.java @@ -195,7 +195,7 @@ public class OrcsApplicabilityOps implements OrcsApplicability { @Override public List<BranchViewToken> getApplicabilityBranches() { - List<BranchViewToken> tokens = new ArrayList<BranchViewToken>(); + List<BranchViewToken> tokens = new ArrayList<>(); for (Branch branch : orcsApi.getQueryFactory().branchQuery().includeArchived(false).includeDeleted( false).andIsOfType(BranchType.BASELINE, BranchType.WORKING).andStateIs(BranchState.CREATED, BranchState.MODIFIED).getResults().getList()) { diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java index e0653d5e44a..5acebfde5db 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/console/BranchPurgeCommand.java @@ -203,7 +203,7 @@ public final class BranchPurgeCommand implements ConsoleCommand { } if (recurse) { - results.addAll(getChildBranchesToPurge(new ArrayList<Branch>(results))); + results.addAll(getChildBranchesToPurge(new ArrayList<>(results))); } return results; } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java index 6aef924a09e..4f4295b2f01 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ArtifactReadOnlyImpl.java @@ -280,7 +280,7 @@ public class ArtifactReadOnlyImpl extends AbstractProxied<Artifact> implements A @Override public ResultSet<RelationReadable> getRelations(RelationTypeSide typeAndSide) { - return new ResultSetList<RelationReadable>(Collections.castAll( + return new ResultSetList<>(Collections.castAll( getRelationManager().getRelations(getSession(), getProxiedObject(), DeletionFlag.EXCLUDE_DELETED))); } @@ -327,7 +327,7 @@ public class ArtifactReadOnlyImpl extends AbstractProxied<Artifact> implements A aNode = thisArtifact; bNode = otherArtifact; } - return new Pair<Artifact, Artifact>(aNode, bNode); + return new Pair<>(aNode, bNode); } private RelationSide whichSideAmIOn(RelationTypeSide typeAndSide) { @@ -367,7 +367,7 @@ public class ArtifactReadOnlyImpl extends AbstractProxied<Artifact> implements A DeletionFlag.EXCLUDE_DELETED)) { boolean relIsSideA = relationTypeSide.getSide().isSideA(); boolean thisOnCorrectSide = - (relIsSideA && relation.getArtIdB() == getId().intValue()) || (!relIsSideA && relation.getArtIdA() == getId().intValue()); + relIsSideA && relation.getArtIdB() == getId().intValue() || !relIsSideA && relation.getArtIdA() == getId().intValue(); if (thisOnCorrectSide && relation.getRelationType().matches(relationTypeSide)) { childIds.add(Long.valueOf(relation.getArtIdB())); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ExternalArtifactManagerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ExternalArtifactManagerImpl.java index 6e76c1b8a2f..b76e4b38804 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ExternalArtifactManagerImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/proxy/impl/ExternalArtifactManagerImpl.java @@ -55,7 +55,7 @@ public class ExternalArtifactManagerImpl implements ExternalArtifactManager { @Override public <T> AttributeReadable<T> asExternalAttribute(OrcsSession session, Attribute<T> attribute) { - return attribute == null ? null : new AttributeReadOnlyImpl<T>(this, session, attribute); + return attribute == null ? null : new AttributeReadOnlyImpl<>(this, session, attribute); } @Override diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java index 38ede97e39c..ff0700c251e 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/impl/RelationManagerImpl.java @@ -74,7 +74,6 @@ public class RelationManagerImpl implements RelationManager { private final RelationResolver resolver; private final RelationFactory relationFactory; private final OrderManagerFactory orderFactory; - private final QueryModuleProvider provider; private final RelationTypes relationTypes; public RelationManagerImpl(Log logger, RelationTypeValidity validity, RelationResolver resolver, RelationFactory relationFactory, OrderManagerFactory orderFactory, QueryModuleProvider queryProvider, RelationTypes relationTypes) { @@ -83,7 +82,6 @@ public class RelationManagerImpl implements RelationManager { this.resolver = resolver; this.relationFactory = relationFactory; this.orderFactory = orderFactory; - this.provider = queryProvider; this.relationTypes = relationTypes; } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManager.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManager.java index 86b56052128..a1a07b90a16 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManager.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/relation/order/OrderManager.java @@ -62,7 +62,7 @@ public class OrderManager implements HasOrderData { @Override public Iterator<Entry<RelationTypeSide, OrderData>> iterator() { List<Entry<RelationTypeSide, OrderData>> entries = - new ArrayList<Entry<RelationTypeSide, OrderData>>(orderDataMap.entrySet()); + new ArrayList<>(orderDataMap.entrySet()); Collections.sort(entries, ENTRY_COMPARATOR); return entries.iterator(); } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandler.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandler.java index 9bd1d4b6b21..0d7b6d80f98 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandler.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/ExcelOutputHandler.java @@ -382,7 +382,7 @@ public class ExcelOutputHandler extends OrcsScriptOutputHandler { writer.endRow(); } Options options = description.getOptions(); - for (String key : new TreeSet<String>(options.getKeys())) { + for (String key : new TreeSet<>(options.getKeys())) { writer.writeCell(key); writer.writeCell(options.get(key).replaceAll("\\s+", " ")); writer.endRow(); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputHandler.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputHandler.java index 0078c8c9e1d..75ad515101d 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputHandler.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/script/impl/JsonOutputHandler.java @@ -298,7 +298,7 @@ public class JsonOutputHandler extends OrcsScriptOutputHandler { writer.writeStringField("session", session.getGuid()); } Options options = description.getOptions(); - for (String key : new TreeSet<String>(options.getKeys())) { + for (String key : new TreeSet<>(options.getKeys())) { writer.writeStringField(key, options.get(key).replaceAll("\\s+", " ")); } writeQuery(queries.get(index)); diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/CreateOrcsTypesIndexCallable.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/CreateOrcsTypesIndexCallable.java index 47208426a6a..5a16f589228 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/CreateOrcsTypesIndexCallable.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/CreateOrcsTypesIndexCallable.java @@ -20,13 +20,11 @@ import org.eclipse.osee.orcs.core.internal.types.OrcsTypesResourceProvider; */ public class CreateOrcsTypesIndexCallable extends CancellableCallable<OrcsTypesIndex> { - private final Log logger; private final OrcsTypesIndexer indexer; private final OrcsTypesResourceProvider provider; public CreateOrcsTypesIndexCallable(Log logger, OrcsTypesIndexer indexer, OrcsTypesResourceProvider provider) { super(); - this.logger = logger; this.indexer = indexer; this.provider = provider; } diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexProviderImpl.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexProviderImpl.java index e864ef266dc..0f4c2b6f021 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexProviderImpl.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/types/impl/OrcsTypesIndexProviderImpl.java @@ -61,7 +61,7 @@ public class OrcsTypesIndexProviderImpl extends LazyObject<OrcsTypesIndex> imple @Override protected FutureTask<OrcsTypesIndex> createLoaderTask() { - return new FutureTask<OrcsTypesIndex>(loader.createLoader()); + return new FutureTask<>(loader.createLoader()); } @Override diff --git a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/OrcsPredicates.java b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/OrcsPredicates.java index d0ba01b59ae..b5b14fb2c2d 100644 --- a/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/OrcsPredicates.java +++ b/plugins/org.eclipse.osee.orcs.core/src/org/eclipse/osee/orcs/core/internal/util/OrcsPredicates.java @@ -61,7 +61,7 @@ public final class OrcsPredicates { } public static <T extends HasDeleteState> Predicate<T> deletionFlagEquals(DeletionFlag includeDeleted) { - return new DeletedMatcher<T>(includeDeleted); + return new DeletedMatcher<>(includeDeleted); } public static Predicate<Attribute<String>> attributeStringEquals(String target) { diff --git a/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/OsgiRule.java b/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/OsgiRule.java index 2a8fbfe5745..be537ad86f4 100644 --- a/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/OsgiRule.java +++ b/plugins/org.eclipse.osee.orcs.db.mock/src/org/eclipse/osee/orcs/db/mock/OsgiRule.java @@ -43,7 +43,7 @@ public class OsgiRule extends TestWatcher { private static AnnotationProcessor createProcessor() { Map<Class<? extends Annotation>, FieldAnnotationHandler<?>> annotationHandlers = - new HashMap<Class<? extends Annotation>, FieldAnnotationHandler<?>>(); + new HashMap<>(); annotationHandlers.put(OsgiService.class, new OsgiServiceFieldAnnotationHandler()); return new AnnotationProcessor(annotationHandlers); diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java index 67fae7711ce..e173660e783 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/SearchAsserts.java @@ -59,7 +59,7 @@ public final class SearchAsserts { public static List<Pair<String, Long>> asTags(String word, long... entries) { List<Pair<String, Long>> data = new ArrayList<>(); for (int index = 0; index < entries.length; index++) { - data.add(new Pair<String, Long>(word, entries[index])); + data.add(new Pair<>(word, entries[index])); } return data; } diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java index 4365d705d1f..b72f17335e0 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/internal/search/tagger/TagProcessorTest.java @@ -109,7 +109,7 @@ public class TagProcessorTest { String[] entries = rawData.split("\r?\n"); for (String entry : entries) { String[] args = entry.split("\\s"); - data.add(new Pair<String, Long>(args[0], Long.valueOf(args[1]))); + data.add(new Pair<>(args[0], Long.valueOf(args[1]))); } return data; } diff --git a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/mocks/MockTagCollector.java b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/mocks/MockTagCollector.java index ef9bceb74d3..1ad05115992 100644 --- a/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/mocks/MockTagCollector.java +++ b/plugins/org.eclipse.osee.orcs.db.test/src/org/eclipse/osee/orcs/db/mocks/MockTagCollector.java @@ -27,6 +27,6 @@ public class MockTagCollector implements TagCollector { @Override public void addTag(String word, Long codedTag) { - actualTags.add(new Pair<String, Long>(word, codedTag)); + actualTags.add(new Pair<>(word, codedTag)); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DbHeathApplication.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DbHeathApplication.java index 256e37b5f64..9a01b70c235 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DbHeathApplication.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/DbHeathApplication.java @@ -26,7 +26,7 @@ public final class DbHeathApplication extends Application { private JdbcService jdbcService; - private final Set<Object> singletons = new HashSet<Object>(); + private final Set<Object> singletons = new HashSet<>(); public void setJdbcService(JdbcService jdbcService) { this.jdbcService = jdbcService; diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeArtifactTypeDatabaseTxCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeArtifactTypeDatabaseTxCallable.java index f1e96f73ceb..6641d31c4bb 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeArtifactTypeDatabaseTxCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/callable/PurgeArtifactTypeDatabaseTxCallable.java @@ -21,12 +21,8 @@ import org.eclipse.osee.orcs.OrcsSession; * @author Roberto E. Escobar */ public final class PurgeArtifactTypeDatabaseTxCallable extends AbstractDatastoreTxCallable<Void> { - @SuppressWarnings("unused") - private final Collection<? extends IArtifactType> typesToPurge; - public PurgeArtifactTypeDatabaseTxCallable(Log logger, OrcsSession session, JdbcClient jdbcClient, Collection<? extends IArtifactType> typesToPurge) { super(logger, session, jdbcClient); - this.typesToPurge = typesToPurge; } @Override diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java index e4db5eb91c1..6b322082ac4 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenBranches.java @@ -147,7 +147,7 @@ public class LoadDeltasBetweenBranches { loadNonCurrentSourceVersionData(idJoin, changeData, sourceBaselineTxId); } - List<ChangeItem> list = new LinkedList<ChangeItem>(changeData.allValues()); + List<ChangeItem> list = new LinkedList<>(changeData.allValues()); return list; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenTxsOnTheSameBranch.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenTxsOnTheSameBranch.java index 4babdd2c9e5..080ec662946 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenTxsOnTheSameBranch.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/change/LoadDeltasBetweenTxsOnTheSameBranch.java @@ -186,7 +186,7 @@ public class LoadDeltasBetweenTxsOnTheSameBranch { idJoin.store(); loadCurrentVersionData(idJoin.getQueryId(), changeData, sourceTx, isArchived); } - List<ChangeItem> list = new LinkedList<ChangeItem>(changeData.allValues()); + List<ChangeItem> list = new LinkedList<>(changeData.allValues()); return list; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExchangeUtil.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExchangeUtil.java index af4cc0daebc..fa4fd164907 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExchangeUtil.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/ExchangeUtil.java @@ -71,7 +71,7 @@ public class ExchangeUtil { wasZipExtractionRequired = false; importSource = source; } - return new Pair<Boolean, File>(wasZipExtractionRequired, importSource); + return new Pair<>(wasZipExtractionRequired, importSource); } public static void cleanUpTempExchangeFile(String exchangePath, Log logger, File exchangeSource, boolean wasZipExtractionRequired) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java index 0d608b92177..0242510ef3e 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/exchange/transform/V0_9_2Transformer.java @@ -45,7 +45,7 @@ public class V0_9_2Transformer implements IOseeExchangeVersionTransformer { private static final Version MAX_VERSION = new Version("0.9.2"); private final Map<ModificationType, ModificationType[]> allowedStates = - new HashMap<ModificationType, ModificationType[]>(); + new HashMap<>(); public V0_9_2Transformer() { ModificationType[] FROM_NEW_OR_INTRODUCED = @@ -95,7 +95,7 @@ public class V0_9_2Transformer implements IOseeExchangeVersionTransformer { Map<Long, Integer> branchToBaseTx = new HashMap<>(10000); processor.parse(ExportItem.OSEE_TX_DETAILS_DATA, new V0_9_2TxDetailsHandler(branchToBaseTx)); processor.transform(ExportItem.OSEE_BRANCH_DATA, new V0_9_2BranchTransformer(branchToBaseTx)); - return new ArrayList<Long>(branchToBaseTx.keySet()); + return new ArrayList<>(branchToBaseTx.keySet()); } private Map<Long, Long> convertArtifactAndConflicts(ExchangeDataProcessor processor) { diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/LoaderSqlHandlerFactoryUtil.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/LoaderSqlHandlerFactoryUtil.java index aa8b68536b8..28137908951 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/LoaderSqlHandlerFactoryUtil.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/loader/handlers/LoaderSqlHandlerFactoryUtil.java @@ -33,7 +33,7 @@ public final class LoaderSqlHandlerFactoryUtil { public static SqlHandlerFactory createHandlerFactory(Log logger, IdentityLocator identityService) { Map<Class<? extends Criteria>, Class<? extends SqlHandler<?>>> handleMap = - new HashMap<Class<? extends Criteria>, Class<? extends SqlHandler<?>>>(); + new HashMap<>(); // Query handleMap.put(CriteriaArtifact.class, ArtifactSqlHandler.class); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java index e216fc422e0..1c52aa6820a 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/ApplicabilityDsQueryImpl.java @@ -60,7 +60,7 @@ public class ApplicabilityDsQueryImpl implements ApplicabilityDsQuery { idJoin.store(); jdbcClient.runQuery( - stmt -> result.add(new Pair<ArtifactId, ApplicabilityToken>(ArtifactId.valueOf(stmt.getLong("art_id")), + stmt -> result.add(new Pair<>(ArtifactId.valueOf(stmt.getLong("art_id")), ApplicabilityToken.create(stmt.getLong("key"), stmt.getString("value")))), SELECT_APPLIC_FOR_ARTS, idJoin.getQueryId(), branch, NOT_CURRENT); } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java index 96646d95fc0..0e3eeebe885 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/engines/TupleQueryImpl.java @@ -69,12 +69,10 @@ public class TupleQueryImpl implements TupleQuery { "select distinct e1, e2 from osee_txs txs, osee_tuple2 app where tuple_type = ? and txs.gamma_id = app.gamma_id and branch_id = ? and tx_current = 1"; private final JdbcClient jdbcClient; - private final SqlJoinFactory sqlJoinFactory; private final KeyValueStore keyValue; TupleQueryImpl(JdbcClient jdbcClient, SqlJoinFactory sqlJoinFactory, KeyValueStore keyValue) { this.jdbcClient = jdbcClient; - this.sqlJoinFactory = sqlJoinFactory; this.keyValue = keyValue; } @@ -88,7 +86,7 @@ public class TupleQueryImpl implements TupleQuery { @Override public <E1, E2> Iterable<Long> getTuple2Raw(Tuple2Type<E1, E2> tupleType, BranchId branchId, E1 e1) { - List<Long> consumer = new ArrayList<Long>(); + List<Long> consumer = new ArrayList<>(); runQuery("e2", consumer, SELECT_E2_BY_TUPLE_TYPE_RAW, tupleType, branchId, e1); return consumer; } diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtil.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtil.java index a77b25cd742..1128a410304 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtil.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/handlers/SqlHandlerFactoryUtil.java @@ -69,28 +69,28 @@ public final class SqlHandlerFactoryUtil { public static SqlHandlerFactory createArtifactSqlHandlerFactory(Log logger, IdentityLocator identityService, TagProcessor tagProcessor) { Map<Class<? extends Criteria>, Class<? extends SqlHandler<?>>> handleMap = - new HashMap<Class<? extends Criteria>, Class<? extends SqlHandler<?>>>(); + new HashMap<>(); addArtifactHandlers(handleMap); return new SqlHandlerFactoryImpl(logger, identityService, tagProcessor, handleMap); } public static SqlHandlerFactory createBranchSqlHandlerFactory(Log logger, IdentityLocator identityService) { Map<Class<? extends Criteria>, Class<? extends SqlHandler<?>>> handleMap = - new HashMap<Class<? extends Criteria>, Class<? extends SqlHandler<?>>>(); + new HashMap<>(); addBranchHandlers(handleMap); return new SqlHandlerFactoryImpl(logger, identityService, null, handleMap); } public static SqlHandlerFactory createTxSqlHandlerFactory(Log logger, IdentityLocator identityService) { Map<Class<? extends Criteria>, Class<? extends SqlHandler<?>>> handleMap = - new HashMap<Class<? extends Criteria>, Class<? extends SqlHandler<?>>>(); + new HashMap<>(); addTxHandlers(handleMap); return new SqlHandlerFactoryImpl(logger, identityService, null, handleMap); } public static SqlHandlerFactory createObjectSqlHandlerFactory(Log logger, IdentityLocator identityService, TagProcessor tagProcessor) { Map<Class<? extends Criteria>, Class<? extends SqlHandler<?>>> handleMap = - new HashMap<Class<? extends Criteria>, Class<? extends SqlHandler<?>>>(); + new HashMap<>(); addBranchHandlers(handleMap); addTxHandlers(handleMap); addArtifactHandlers(handleMap); diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/IndexBranchesDatabaseCallable.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/IndexBranchesDatabaseCallable.java index 3538f4b46aa..c9dc7bf0c18 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/IndexBranchesDatabaseCallable.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/search/indexer/callable/producer/IndexBranchesDatabaseCallable.java @@ -172,6 +172,6 @@ public final class IndexBranchesDatabaseCallable extends AbstractDatastoreCallab searchQuery = FIND_TAGGABLE_ATTRIBUTES_BY_BRANCH; } } - return new Triplet<String, String, Object[]>(countQuery, searchQuery, params); + return new Triplet<>(countQuery, searchQuery, params); } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlAliasManager.java b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlAliasManager.java index 5df8c826022..d652941dee9 100644 --- a/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlAliasManager.java +++ b/plugins/org.eclipse.osee.orcs.db/src/org/eclipse/osee/orcs/db/internal/sql/SqlAliasManager.java @@ -116,7 +116,7 @@ public class SqlAliasManager { private static final class AliasSet { private final Map<String, ListMultimap<ObjectType, String>> used = - new HashMap<String, ListMultimap<ObjectType, String>>(); + new HashMap<>(); public List<String> getAliases(String key, ObjectType type) { ListMultimap<ObjectType, String> data = used.get(key); diff --git a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/PredicateFactoryImpl.java b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/PredicateFactoryImpl.java index 2954ef6653d..002f9e6ed60 100644 --- a/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/PredicateFactoryImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest.client/src/org/eclipse/osee/orcs/rest/client/internal/search/PredicateFactoryImpl.java @@ -76,7 +76,7 @@ public class PredicateFactoryImpl implements PredicateFactory { @Override public Predicate createAttributeTypeSearch(Collection<? extends AttributeTypeId> attributeTypes, Collection<String> values, QueryOption... options) { List<String> typeIds = getLongIds(attributeTypes); - return new Predicate(SearchMethod.ATTRIBUTE_TYPE, typeIds, new LinkedList<String>(values), options); + return new Predicate(SearchMethod.ATTRIBUTE_TYPE, typeIds, new LinkedList<>(values), options); } @Override diff --git a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/writer/OrcsWriterToken.java b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/writer/OrcsWriterToken.java index f80451f04e5..aa12a15100c 100644 --- a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/writer/OrcsWriterToken.java +++ b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/writer/OrcsWriterToken.java @@ -23,6 +23,7 @@ public class OrcsWriterToken extends NamedIdBase { super(id, name); } + @Override public void setId(Long id) { this.id = id; } diff --git a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/writer/reader/OwBase.java b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/writer/reader/OwBase.java index 4eca140f224..bb24584c3d1 100644 --- a/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/writer/reader/OwBase.java +++ b/plugins/org.eclipse.osee.orcs.rest.model/src/org/eclipse/osee/orcs/rest/model/writer/reader/OwBase.java @@ -42,6 +42,7 @@ public class OwBase extends NamedIdBase { this.data = data; } + @Override public void setId(Long id) { this.id = id; } diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsApplication.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsApplication.java index 00c62ce3d38..4999094a215 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsApplication.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/OrcsApplication.java @@ -36,8 +36,6 @@ public class OrcsApplication extends Application { private IResourceManager resourceManager; private ActivityLog activityLog; private JdbcService jdbcService; - private EventAdmin eventAdmin; - public void setOrcsApi(OrcsApi orcsApi) { this.orcsApi = orcsApi; } @@ -51,7 +49,6 @@ public class OrcsApplication extends Application { } public void setEventAdmin(EventAdmin eventAdmin) { - this.eventAdmin = eventAdmin; } public void setResourceManager(IResourceManager resourceManager) { diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/applicability/ApplicabilityEndpointImpl.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/applicability/ApplicabilityEndpointImpl.java index 8b1f0d215ad..9d14f73ad06 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/applicability/ApplicabilityEndpointImpl.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/applicability/ApplicabilityEndpointImpl.java @@ -82,7 +82,7 @@ public class ApplicabilityEndpointImpl implements ApplicabilityEndpoint { public List<Pair<ArtifactId, ApplicabilityToken>> getApplicabilityTokensForArts(Collection<? extends ArtifactId> artIds) { List<Pair<ArtifactId, ApplicabilityToken>> artToApplicToken = new ArrayList<>(); for (ArtifactId artId : artIds) { - artToApplicToken.add(new Pair<ArtifactId, ApplicabilityToken>(artId, getApplicabilityToken(artId))); + artToApplicToken.add(new Pair<>(artId, getApplicabilityToken(artId))); } return artToApplicToken; } diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writers/BranchJsonWriter.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writers/BranchJsonWriter.java index aa47567f85c..0bbadf70cdd 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writers/BranchJsonWriter.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writers/BranchJsonWriter.java @@ -31,10 +31,7 @@ import org.eclipse.osee.orcs.OrcsApi; @Provider public class BranchJsonWriter implements MessageBodyWriter<Branch> { private JsonFactory jsonFactory; - private OrcsApi orcsApi; - public void setOrcsApi(OrcsApi orcsApi) { - this.orcsApi = orcsApi; } public void start() { diff --git a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writers/BranchesJsonWriter.java b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writers/BranchesJsonWriter.java index bf7bae051ed..9fdbb3efdaf 100644 --- a/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writers/BranchesJsonWriter.java +++ b/plugins/org.eclipse.osee.orcs.rest/src/org/eclipse/osee/orcs/rest/internal/writers/BranchesJsonWriter.java @@ -33,10 +33,7 @@ import org.eclipse.osee.orcs.OrcsApi; @Provider public class BranchesJsonWriter implements MessageBodyWriter<Collection<Branch>> { private JsonFactory jsonFactory; - private OrcsApi orcsApi; - public void setOrcsApi(OrcsApi orcsApi) { - this.orcsApi = orcsApi; } public void start() { diff --git a/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsImageProvider.java b/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsImageProvider.java index 95ac031fe7c..6152a571384 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsImageProvider.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsImageProvider.java @@ -26,7 +26,7 @@ public class DefaultOrcsImageProvider implements IOrcsImageProvider { private static final String CLASSNAME = "classname"; private final ExtensionDefinedObjects<IOrcsImageProvider> extensions = - new ExtensionDefinedObjects<IOrcsImageProvider>(EXTENSION_POINT_ID, EXTENSION_ELEMENT, CLASSNAME, true); + new ExtensionDefinedObjects<>(EXTENSION_POINT_ID, EXTENSION_ELEMENT, CLASSNAME, true); private List<IOrcsImageProvider> getProviders() { return extensions.getObjects(); diff --git a/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsObjectProvider.java b/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsObjectProvider.java index 00e7739fa5f..ff23d7b7a43 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsObjectProvider.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl.ui/src/org/eclipse/osee/orcs/script/dsl/ui/internal/DefaultOrcsObjectProvider.java @@ -27,7 +27,7 @@ public class DefaultOrcsObjectProvider implements IOrcsObjectProvider { private static final String CLASSNAME = "classname"; private final ExtensionDefinedObjects<IOrcsObjectProvider> extensions = - new ExtensionDefinedObjects<IOrcsObjectProvider>(EXTENSION_POINT_ID, EXTENSION_ELEMENT, CLASSNAME, true); + new ExtensionDefinedObjects<>(EXTENSION_POINT_ID, EXTENSION_ELEMENT, CLASSNAME, true); @Override public Iterable<? extends NamedIdBase> getBranches() { diff --git a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/OsExpressionResolver.java b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/OsExpressionResolver.java index edcba9a0be4..c7c6cee143a 100644 --- a/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/OsExpressionResolver.java +++ b/plugins/org.eclipse.osee.orcs.script.dsl/src/org/eclipse/osee/orcs/script/dsl/typesystem/OsExpressionResolver.java @@ -35,7 +35,7 @@ public class OsExpressionResolver implements IExpressionResolver { @Override public <T> List<T> resolve(Class<T> clazz, OsExpression expression) { ExpressionValueResolver<T> resolver = - new ExpressionValueResolver<T>(tsConverter, numberConverter, clazz, isCycleProtected()); + new ExpressionValueResolver<>(tsConverter, numberConverter, clazz, isCycleProtected()); List<T> resolved = resolver.resolve(expression); return resolved != null ? resolved : Collections.<T> emptyList(); } diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java index e7de4b6bb18..113b9438042 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/dialogs/OverrideInvalidScriptRevisions.java @@ -36,7 +36,7 @@ public class OverrideInvalidScriptRevisions implements IOverrideHandler { Set<Object> toReturn = new HashSet<>(); for (Object object : unselectable) { if (object instanceof Artifact) { - ArtifactTestRunOperator operator = new ArtifactTestRunOperator(((Artifact) object)); + ArtifactTestRunOperator operator = new ArtifactTestRunOperator((Artifact) object); if (operator.hasNotBeenCommitted() != false) { toReturn.add(object); } diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java index dd20c05e476..685969ae30e 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/reports/ExtensionDefinedReports.java @@ -58,7 +58,7 @@ public class ExtensionDefinedReports { Set<String> ids = reportMap.keySet(); for (String id : ids) { ReportData data = reportMap.get(id); - this.idsAndNameMap.put(id, new Pair<String, String>(id, data.getName())); + this.idsAndNameMap.put(id, new Pair<>(id, data.getName())); } } return idsAndNameMap.values().toArray(new Pair[idsAndNameMap.size()]); diff --git a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java index 913f09a5010..1d5c65f1fc0 100644 --- a/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java +++ b/plugins/org.eclipse.osee.ote.ui.define/src/org/eclipse/osee/ote/ui/define/viewers/DragDropHandler.java @@ -177,7 +177,7 @@ public class DragDropHandler { artifactsToAdd.add(artifact); } } - addArtifactsToTable(new ArrayList<Artifact>(artifactsToAdd)); + addArtifactsToTable(new ArrayList<>(artifactsToAdd)); } private void handleResourceDrops(URI[] iFiles) { diff --git a/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/ServerApplication.java b/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/ServerApplication.java index 10822951b44..c638a299967 100644 --- a/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/ServerApplication.java +++ b/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/ServerApplication.java @@ -29,7 +29,7 @@ import org.eclipse.osee.server.application.internal.ServerHealthEndpointImpl; @ApplicationPath("server") public class ServerApplication extends Application { - private final Set<Object> singletons = new HashSet<Object>(); + private final Set<Object> singletons = new HashSet<>(); private IApplicationServerManager applicationServerManager; private final Map<String, JdbcService> jdbcServices = new ConcurrentHashMap<>(); private IAuthenticationManager authManager; diff --git a/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/ServerHealthEndpointImpl.java b/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/ServerHealthEndpointImpl.java index 60b4f10e45c..92c00b0e1d3 100644 --- a/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/ServerHealthEndpointImpl.java +++ b/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/ServerHealthEndpointImpl.java @@ -70,7 +70,7 @@ public final class ServerHealthEndpointImpl { InputStream is = p.getInputStream(); int value = -1; while ((value = is.read()) != -1) { - sb.append(((char) value)); + sb.append((char) value); } int exitCode = p.waitFor(); sb.append("Top exited with " + exitCode); @@ -109,7 +109,7 @@ public final class ServerHealthEndpointImpl { } String serversStr = ((String) serverObj).replaceAll("[\\[\\]]", ""); serversStr = serversStr.replaceAll(" ", ""); - List<String> servers = new ArrayList<String>(); + List<String> servers = new ArrayList<>(); for (String server : serversStr.split(",")) { servers.add(server); } @@ -136,7 +136,7 @@ public final class ServerHealthEndpointImpl { } } sb.append(AHTML.addHeaderRowMultiColumnTable(headers)); - for (String server : (servers)) { + for (String server : servers) { addServer(sb, server, details); } sb.append(AHTML.endMultiColumnTable()); diff --git a/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/model/ServerStatus.java b/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/model/ServerStatus.java index c79a139162b..273fc81037f 100644 --- a/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/model/ServerStatus.java +++ b/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/model/ServerStatus.java @@ -21,7 +21,7 @@ import org.codehaus.jackson.annotate.JsonIgnore; */ public class ServerStatus { - private final Map<String, String> data = new HashMap<String, String>(); + private final Map<String, String> data = new HashMap<>(); private final List<String> threadStats = new LinkedList<>(); public final List<String> garbageCollectorStats = new LinkedList<>(); diff --git a/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/operations/BuildServerStatusOperation.java b/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/operations/BuildServerStatusOperation.java index e9a8f6fa7ed..88d17f6b517 100644 --- a/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/operations/BuildServerStatusOperation.java +++ b/plugins/org.eclipse.osee.server.application/src/org/eclipse/osee/server/application/internal/operations/BuildServerStatusOperation.java @@ -54,8 +54,8 @@ public class BuildServerStatusOperation { stat.set(StatusKey.StartTime, DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG).format( applicationServerManager.getDateStarted())); int seconds = (int) (runtimeMxBean.getUptime() / 1000) % 60; - int minutes = (int) ((runtimeMxBean.getUptime() / (1000 * 60)) % 60); - int hours = (int) ((runtimeMxBean.getUptime() / (1000 * 60 * 60)) % 24); + int minutes = (int) (runtimeMxBean.getUptime() / (1000 * 60) % 60); + int hours = (int) (runtimeMxBean.getUptime() / (1000 * 60 * 60) % 24); stat.set(StatusKey.UpTime, String.format("%s hr %s min %s sec", hours, minutes, seconds)); stat.set(StatusKey.SystemLoad, String.valueOf(osMxBean.getSystemLoadAverage())); diff --git a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestValidator.java b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestValidator.java index 59221e3ba7e..5548c0f1313 100644 --- a/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestValidator.java +++ b/plugins/org.eclipse.osee.support.test.util/src/org/eclipse/osee/support/test/util/UnitTestValidator.java @@ -34,7 +34,7 @@ public class UnitTestValidator { private static List<File> testClassFiles = new ArrayList<>(); private static List<File> notForSuiteFiles = new ArrayList<>(); private static final Map<String, Collection<String>> testClassToSuites = - new HashMap<String, Collection<String>>(100); + new HashMap<>(100); private static final List<File> suites = new ArrayList<>(); private static final String NOT_FOR_SUITE = "NOT_FOR_SUITE"; diff --git a/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/PageCreatorTest.java b/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/PageCreatorTest.java index 359c2a3917d..9e6e83cfe2f 100644 --- a/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/PageCreatorTest.java +++ b/plugins/org.eclipse.osee.template.engine.test/src/org/eclipse/osee/template/engine/PageCreatorTest.java @@ -150,14 +150,14 @@ public class PageCreatorTest { @Test public void testListItemRule() { PageCreator page = new PageCreator(registry); - page.addSubstitution(new ListItemRule<Pair<CharSequence, CharSequence>>("key1", + page.addSubstitution(new ListItemRule<>("key1", new HyperLinkRule("ruleNameDoesntMatter", "http://www.eclipse.org", "Eclipse"))); CompositeRule<Pair<CharSequence, CharSequence>> listItemsComposite = - new CompositeRule<Pair<CharSequence, CharSequence>>("key2"); + new CompositeRule<>("key2"); - ListItemRule<Pair<CharSequence, CharSequence>> li1 = new ListItemRule<Pair<CharSequence, CharSequence>>( + ListItemRule<Pair<CharSequence, CharSequence>> li1 = new ListItemRule<>( "keyDoesntMatter", new HyperLinkRule("keyDoesntMatter", "http://www.stackoverflow.com", "Stack Overflow")); - ListItemRule<Pair<CharSequence, CharSequence>> li2 = new ListItemRule<Pair<CharSequence, CharSequence>>( + ListItemRule<Pair<CharSequence, CharSequence>> li2 = new ListItemRule<>( "keyDoesntMatter", new HyperLinkRule("keyDoesntMatter", "http://www.google.com", "Google!")); listItemsComposite.addRule(li1); diff --git a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/PageCreator.java b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/PageCreator.java index cc5c45af332..f1d9744fb43 100644 --- a/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/PageCreator.java +++ b/plugins/org.eclipse.osee.template.engine/src/org/eclipse/osee/template/engine/PageCreator.java @@ -49,7 +49,7 @@ public final class PageCreator { private final IResourceRegistry registry; private final ConcurrentHashMap<String, AppendableRule<?>> substitutions = - new ConcurrentHashMap<String, AppendableRule<?>>(); + new ConcurrentHashMap<>(); public PageCreator(IResourceRegistry registry) { this.registry = registry; diff --git a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java index 6ea2fd354a7..9eecb6983ad 100644 --- a/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java +++ b/plugins/org.eclipse.osee.vcast/src/org/eclipse/osee/vcast/VCastLisFileParser.java @@ -45,7 +45,7 @@ public class VCastLisFileParser { } else { lineCode = "Error parsing *.LIS file"; } - return new Pair<String, Boolean>(lineCode, exceptionLine); + return new Pair<>(lineCode, exceptionLine); } Matcher m = exceptionPattern.matcher(line); if (m.find()) { |