diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee')
115 files changed, 307 insertions, 310 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java index a8e60924766..e8d188afe7f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/OseeGroup.java @@ -31,7 +31,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.search.ArtifactQuery; public class OseeGroup { private Artifact groupArtifact; - private final Map<IArtifactToken, Boolean> temporaryOverride = new HashMap<IArtifactToken, Boolean>(); + private final Map<IArtifactToken, Boolean> temporaryOverride = new HashMap<>(); private final IArtifactToken token; public OseeGroup(IArtifactToken token) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java index 06ffa1b95eb..5566179a4e4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/User.java @@ -92,7 +92,7 @@ public class User extends Artifact { public void toggleFavoriteBranch(Branch favoriteBranch) throws OseeCoreException { Conditions.checkNotNull(favoriteBranch, "Branch"); - HashSet<Long> branchUuids = new HashSet<Long>(); + HashSet<Long> branchUuids = new HashSet<>(); for (Branch branch : BranchManager.getBranches(BranchArchivedState.UNARCHIVED, BranchType.WORKING, BranchType.BASELINE)) { branchUuids.add(branch.getUuid()); 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 ffd2d491cbf..679f486c235 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 @@ -83,7 +83,7 @@ public final class UserManager { } public static List<User> getUsersByUserId(Collection<String> userIds) throws OseeCoreException { - List<User> users = new ArrayList<User>(); + List<User> users = new ArrayList<>(); for (String userId : userIds) { try { User user = getUserAdmin().getUserByUserId(userId); 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 d6b42b1b786..0c3df05f4d0 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 @@ -214,7 +214,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA @SuppressWarnings("unchecked") public final <A extends Artifact> List<A> getRelatedArtifactsOfType(IRelationTypeSide side, Class<A> clazz) throws OseeCoreException { - List<A> objs = new ArrayList<A>(); + List<A> objs = new ArrayList<>(); for (Artifact art : getRelatedArtifacts(side)) { if (clazz.isInstance(art)) { objs.add((A) art); @@ -286,7 +286,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * from getArtifactRoot(). */ public final List<Artifact> getAncestors() throws OseeCoreException { - List<Artifact> ancestors = new ArrayList<Artifact>(); + List<Artifact> ancestors = new ArrayList<>(); for (Artifact parent = getParent(); parent != null; parent = parent.getParent()) { ancestors.add(parent); @@ -304,7 +304,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public final List<Integer> getAttributeIds(IAttributeType attributeType) throws OseeCoreException { - List<Integer> items = new ArrayList<Integer>(); + List<Integer> items = new ArrayList<>(); List<Attribute<Object>> data = getAttributes(attributeType); for (Attribute<Object> attribute : data) { Integer value = new Integer(attribute.getId()); @@ -344,7 +344,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA if (this.equals(OseeSystemArtifacts.getDefaultHierarchyRootArtifact(getBranch()))) { root = this; } else { - Set<Artifact> set = new HashSet<Artifact>(); + Set<Artifact> set = new HashSet<>(); set.add(this); for (Artifact parent = getParent(); parent != null; parent = parent.getParent()) { if (set.add(parent)) { @@ -392,7 +392,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public final List<Artifact> getDescendants(DeletionFlag includeDeleted) throws OseeCoreException { - List<Artifact> descendants = new LinkedList<Artifact>(); + List<Artifact> descendants = new LinkedList<>(); getDescendants(descendants, includeDeleted); return descendants; } @@ -401,7 +401,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * @return a list of artifacts ordered by a depth first traversal of this artifact's descendants */ public final List<Artifact> getDescendants() throws OseeCoreException { - List<Artifact> descendants = new LinkedList<Artifact>(); + List<Artifact> descendants = new LinkedList<>(); getDescendants(descendants, DeletionFlag.EXCLUDE_DELETED); return descendants; } @@ -414,7 +414,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public List<Artifact> getDescendantsWithArtTypes(Collection<ArtifactType> descendantTypes) throws OseeCoreException { - List<Artifact> descendants = new LinkedList<Artifact>(); + List<Artifact> descendants = new LinkedList<>(); for (Artifact child : getChildren()) { ArtifactType childArtType = child.getArtifactType(); if (descendantTypes.contains(childArtType)) { @@ -489,7 +489,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * The use of this method is discouraged since it directly returns Attributes. */ public final <T> List<Attribute<T>> getAttributes(IAttributeType attributeType, Object value) throws OseeCoreException { - List<Attribute<?>> filteredList = new ArrayList<Attribute<?>>(); + List<Attribute<?>> filteredList = new ArrayList<>(); for (Attribute<?> attribute : getAttributes(attributeType)) { if (attribute.getValue().equals(value)) { filteredList.add(attribute); @@ -544,7 +544,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } private List<Attribute<?>> filterByModificationType(Collection<Attribute<?>> attributes, Set<ModificationType> allowedModTypes) { - List<Attribute<?>> filteredList = new ArrayList<Attribute<?>>(); + List<Attribute<?>> filteredList = new ArrayList<>(); if (allowedModTypes != null && !allowedModTypes.isEmpty() && attributes != null && !attributes.isEmpty()) { for (Attribute<?> attribute : attributes) { if (allowedModTypes.contains(attribute.getModificationType())) { @@ -775,7 +775,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * @return comma delimited representation of all the attributes of the type attributeName */ public final String getAttributesToString(IAttributeType attributeType, boolean sorted) throws OseeCoreException { - List<String> strs = new ArrayList<String>(); + List<String> strs = new ArrayList<>(); List<Attribute<Object>> attributes = getAttributes(attributeType); if (sorted) { java.util.Collections.sort(attributes); @@ -791,7 +791,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * @return comma separator representation unique values of the attributes of the type attributeName */ public final String getAttributesToStringUnique(IAttributeType attributeType, String separator) throws OseeCoreException { - Set<String> strs = new HashSet<String>(); + Set<String> strs = new HashSet<>(); for (Attribute<?> attr : getAttributes(attributeType)) { strs.add(String.valueOf(attr)); } @@ -832,10 +832,10 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA public final void setAttributeValues(IAttributeType attributeType, Collection<String> newValues) throws OseeCoreException { ensureAttributesLoaded(); // ensure new values are unique - HashSet<String> uniqueNewValues = new HashSet<String>(newValues); + HashSet<String> uniqueNewValues = new HashSet<>(newValues); List<Attribute<Object>> remainingAttributes = getAttributes(attributeType); - List<String> remainingNewValues = new ArrayList<String>(uniqueNewValues.size()); + List<String> remainingNewValues = new ArrayList<>(uniqueNewValues.size()); // all existing attributes matching a new value will be left untouched for (String newValue : uniqueNewValues) { @@ -873,7 +873,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA Set<T> uniqueItems = Collections.toSet(values); List<Attribute<T>> remainingAttributes = getAttributes(attributeType); - List<T> remainingNewValues = new ArrayList<T>(uniqueItems.size()); + List<T> remainingNewValues = new ArrayList<>(uniqueItems.size()); // all existing attributes matching a new value will be left untouched for (T newValue : uniqueItems) { @@ -975,7 +975,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA public final List<String> getAttributesToStringList(IAttributeType attributeType) throws OseeCoreException { ensureAttributesLoaded(); - List<String> items = new ArrayList<String>(); + List<String> items = new ArrayList<>(); for (Attribute<?> attribute : getAttributes(attributeType)) { items.add(attribute.getDisplayableString()); } @@ -985,7 +985,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA public final <T> List<T> getAttributeValues(IAttributeType attributeType) throws OseeCoreException { ensureAttributesLoaded(); - List<T> items = new ArrayList<T>(); + List<T> items = new ArrayList<>(); List<Attribute<T>> data = getAttributes(attributeType); for (Attribute<T> attribute : data) { T value = attribute.getValue(); @@ -1232,7 +1232,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * Remove artifact from a specific branch in the database */ public final void purgeFromBranch(boolean purgeChildren) throws OseeCoreException { - Collection<Artifact> artifacts = new LinkedHashSet<Artifact>(); + Collection<Artifact> artifacts = new LinkedHashSet<>(); artifacts.add(this); if (purgeChildren) { artifacts.addAll(getDescendants()); @@ -1490,7 +1490,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public final Collection<AttributeChange> getDirtyFrameworkAttributeChanges() throws OseeDataStoreException { - List<AttributeChange> dirtyAttributes = new LinkedList<AttributeChange>(); + List<AttributeChange> dirtyAttributes = new LinkedList<>(); for (Attribute<?> attribute : internalGetAttributes()) { if (attribute.isDirty()) { @@ -1614,7 +1614,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA * Return relations that exist between artifacts */ public final ArrayList<RelationLink> internalGetRelations(Artifact artifact) throws OseeCoreException { - ArrayList<RelationLink> relations = new ArrayList<RelationLink>(); + ArrayList<RelationLink> relations = new ArrayList<>(); for (RelationLink relation : getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) { try { if (relation.getArtifactOnOtherSide(this).equals(artifact)) { @@ -1636,7 +1636,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA */ @Deprecated public final ArrayList<RelationLink> getRelations(IRelationTypeSide side, Artifact artifact) throws OseeCoreException { - ArrayList<RelationLink> relations = new ArrayList<RelationLink>(); + ArrayList<RelationLink> relations = new ArrayList<>(); for (RelationLink relation : getRelations(side)) { try { if (relation.getArtifactOnOtherSide(this).equals(artifact)) { @@ -1726,7 +1726,7 @@ public class Artifact extends FullyNamedIdentity<String>implements IArtifact, IA } public Set<AttributeType> getAttributeTypesUsed() throws OseeCoreException { - Set<AttributeType> types = new HashSet<AttributeType>(); + Set<AttributeType> types = new HashSet<>(); for (Attribute<?> attr : getAttributes()) { types.add(attr.getAttributeType()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java index d95d203ed08..0a7d69b83b2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCache.java @@ -69,7 +69,7 @@ public final class ArtifactCache { } public static List<Artifact> getArtifactsByName(IArtifactType artifactType, String name) { - List<Artifact> arts = new ArrayList<Artifact>(); + List<Artifact> arts = new ArrayList<>(); for (Artifact artifact : getArtifactsByType(artifactType)) { if (artifact.getName().equals(name)) { arts.add(artifact); @@ -117,7 +117,7 @@ public final class ArtifactCache { } public static Collection<Artifact> getActive(Collection<? extends IBasicGuidArtifact> basicGuidArtifacts) throws OseeCoreException { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); for (IBasicGuidArtifact guidArt : basicGuidArtifacts) { Artifact art = getActive(guidArt); if (art != null) { @@ -151,7 +151,7 @@ public final class ArtifactCache { */ @SuppressWarnings("unchecked") public static <A extends Artifact> Collection<A> getActive(IBasicGuidRelation guidRel, Class<A> clazz) throws OseeCoreException { - List<A> arts = new ArrayList<A>(); + List<A> arts = new ArrayList<>(); Artifact artA = getActiveA(guidRel); if (artA != null) { if (clazz == null || clazz.isInstance(artA)) { @@ -208,7 +208,7 @@ public final class ArtifactCache { } public static Collection<Artifact> getListByTextId(String key, IOseeBranch branch) throws OseeCoreException { - List<Artifact> artifacts = new ArrayList<Artifact>(); + List<Artifact> artifacts = new ArrayList<>(); Collection<Artifact> cached = ACTIVE_CACHE.getListByText(key, BranchManager.getBranch(branch)); // decache any deleted artifacts for (Artifact artifact : cached) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java index 443ed37a3cc..2156ccde531 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactCacheQuery.java @@ -34,7 +34,7 @@ public class ArtifactCacheQuery { * before returning. */ public static Set<Artifact> getArtifactsFromArtifactByText(IArtifactType artifactType, IAttributeType attributeType, String text, IOseeBranch branch, boolean queryIfNotFound) throws OseeCoreException { - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); // Retrieve cached artifacts first for (Artifact artifact : ArtifactCache.getListByTextId(text, branch)) { if (artifact.isOfType(artifactType) && !artifact.isDeleted()) { 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 70c3b153a0c..ed4e51197ff 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 @@ -30,7 +30,7 @@ public class ArtifactChecks { public static List<IArtifactCheck> getArtifactChecks() { if (checks == null) { - checks = new ArrayList<IArtifactCheck>(); + checks = new ArrayList<>(); checks.addAll(artifactCheckObjects.getObjects()); checks.add(new UserArtifactCheck()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java index 3e42ef106a9..76735c3b0de 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactFactory.java @@ -31,7 +31,7 @@ import org.eclipse.osee.framework.jdk.core.util.Strings; */ public abstract class ArtifactFactory { public static final String ART_ID_SEQ = "SKYNET_ART_ID_SEQ"; - private final Set<IArtifactType> artifactTypeNames = new HashSet<IArtifactType>(5); + private final Set<IArtifactType> artifactTypeNames = new HashSet<>(5); protected ArtifactFactory(IArtifactType... artifactTypes) { for (IArtifactType artifactType : artifactTypes) { 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 788e23b4e2d..b472123d19b 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 @@ -64,7 +64,7 @@ public final class ArtifactLoader { } public static List<Artifact> loadArtifacts(Collection<Integer> artIds, IOseeBranch branch, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted, TransactionRecord transactionId) throws OseeCoreException { - List<Pair<Integer, Long>> toLoad = new LinkedList<Pair<Integer, Long>>(); + List<Pair<Integer, Long>> toLoad = new LinkedList<>(); Long branchUuid = branch.getUuid(); for (Integer artId : new HashSet<Integer>(artIds)) { toLoad.add(new Pair<Integer, Long>(artId, branchUuid)); @@ -78,7 +78,7 @@ public final class ArtifactLoader { } private static List<Artifact> loadSelectedArtifacts(List<Pair<Integer, Long>> toLoad, LoadLevel loadLevel, LoadType reload, DeletionFlag allowDeleted, TransactionRecord transactionId) throws OseeCoreException { - Set<Artifact> artifacts = new LinkedHashSet<Artifact>(); + Set<Artifact> artifacts = new LinkedHashSet<>(); if (transactionId == null) { loadActiveArtifacts(toLoad, artifacts, loadLevel, reload, allowDeleted); } else { @@ -254,7 +254,7 @@ public final class ArtifactLoader { data = loadedItems; } else { // Use a new list if loaded items already contains data to prevent artifact overwrites during loading - data = new ArrayList<Artifact>(joinQuery.size()); + data = new ArrayList<>(joinQuery.size()); } long time = System.currentTimeMillis(); try { @@ -282,7 +282,7 @@ public final class ArtifactLoader { JdbcStatement chStmt = ConnectionHandler.getStatement(); long time = System.currentTimeMillis(); - List<Pair<Integer, Long>> toLoad = new LinkedList<Pair<Integer, Long>>(); + List<Pair<Integer, Long>> toLoad = new LinkedList<>(); try { chStmt.runPreparedQuery(artifactCountEstimate, sql, queryParameters); @@ -336,7 +336,7 @@ public final class ArtifactLoader { joinQuery.add(artifact.getArtId(), artifact.getFullBranch().getUuid()); joinQuery.store(); - List<Artifact> artifacts = new ArrayList<Artifact>(1); + List<Artifact> artifacts = new ArrayList<>(1); artifacts.add(artifact); loadArtifactsData(joinQuery.getQueryId(), artifacts, loadLevel, LoadType.INCLUDE_CACHE, null, artifact.isDeleted() ? DeletionFlag.INCLUDE_DELETED : DeletionFlag.EXCLUDE_DELETED); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java index a147186d53a..d76821916f6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactPersistenceManager.java @@ -76,7 +76,7 @@ public class ArtifactPersistenceManager { } private static void bulkLoadRelatives(Collection<Artifact> artifacts) throws OseeCoreException { - Collection<Integer> artIds = new HashSet<Integer>(); + Collection<Integer> artIds = new HashSet<>(); for (Artifact artifact : artifacts) { for (RelationLink link : artifact.getRelationsAll(DeletionFlag.EXCLUDE_DELETED)) { artIds.add(link.getAArtifactId()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java index ac863ad7135..7a2f40d09bf 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactTypeManager.java @@ -67,7 +67,7 @@ public class ArtifactTypeManager { public static Collection<ArtifactType> getArtifactTypesFromAttributeType(IAttributeType attributeType, IOseeBranch branchToken) throws OseeCoreException { Branch branch = getCacheService().getBranchCache().get(branchToken); - List<ArtifactType> artifactTypes = new ArrayList<ArtifactType>(); + List<ArtifactType> artifactTypes = new ArrayList<>(); for (ArtifactType artifactType : getAllTypes()) { if (artifactType.isValidAttributeType(attributeType, branch)) { artifactTypes.add(artifactType); @@ -196,18 +196,18 @@ public class ArtifactTypeManager { public static void purgeArtifactTypesWithCheck(Collection<? extends IArtifactType> purgeArtifactTypes, IArtifactType newArtifactType) throws OseeCoreException { for (IArtifactType purgeArtifactType : purgeArtifactTypes) { // find all artifact of this type on all branches and make a unique list for type change (since it is not by branch) - Set<Artifact> artifacts = new LinkedHashSet<Artifact>(); + Set<Artifact> artifacts = new LinkedHashSet<>(); for (IOseeBranch branch : BranchManager.getBranches(new BranchFilter())) { artifacts.addAll(ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.SoftwareRequirement, branch, DeletionFlag.INCLUDE_DELETED)); } if (artifacts.size() > 0) { - HashMap<Integer, Artifact> artifactMap = new HashMap<Integer, Artifact>(); + HashMap<Integer, Artifact> artifactMap = new HashMap<>(); for (Artifact artifact : artifacts) { artifactMap.put(artifact.getArtId(), artifact); } if (newArtifactType == null) { - HashSet<IOseeBranch> branches = new HashSet<IOseeBranch>(); + HashSet<IOseeBranch> branches = new HashSet<>(); for (Artifact artifact : artifacts) { branches.add(artifact.getBranch()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactURL.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactURL.java index f5ca650666b..8db964af31c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactURL.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactURL.java @@ -32,7 +32,7 @@ import org.eclipse.osee.framework.skynet.core.utility.OseeInfo; public class ArtifactURL { public static URL getExternalArtifactLink(final Artifact artifact) throws OseeCoreException { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put("guid", artifact.getGuid()); parameters.put("branchUuid", String.valueOf(artifact.getBranch().getUuid())); String urlString = getPermanentLinkBaseUrl(OseeServerContext.ARTIFACT_CONTEXT, parameters); @@ -46,7 +46,7 @@ public class ArtifactURL { } public static URL getOpenInOseeLink(final Artifact artifact, String cmd) throws OseeCoreException { - Map<String, String> parameters = new HashMap<String, String>(); + Map<String, String> parameters = new HashMap<>(); parameters.put("sessionId", ClientSessionManager.getSessionId()); parameters.put("context", "osee/loopback"); parameters.put("guid", artifact.getGuid()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java index df634b316f3..58a06feae73 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Attribute.java @@ -48,7 +48,7 @@ public abstract class Attribute<T> implements Comparable<Attribute<T>> { void internalInitialize(IAttributeType attributeType, Artifact artifact, ModificationType modificationType, boolean markDirty, boolean setDefaultValue) throws OseeCoreException { this.attributeTypeToken = attributeType; - this.artifactRef = new WeakReference<Artifact>(artifact); + this.artifactRef = new WeakReference<>(artifact); internalSetModType(modificationType, false, markDirty); try { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java index 80832ec2156..ab3115b0e54 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/AttributeLoader.java @@ -49,7 +49,7 @@ public class AttributeLoader { Artifact currentArtifact = null; AttrData previousAttr = new AttrData(); - List<AttrData> currentAttributes = new ArrayList<AttrData>(); + List<AttrData> currentAttributes = new ArrayList<>(); while (chStmt.next()) { AttrData nextAttr = new AttrData(chStmt, historical); @@ -130,7 +130,7 @@ public class AttributeLoader { if (artifact == null) { return; // If the artifact is null, it means the attributes are orphaned. } - List<Integer> transactionNumbers = new ArrayList<Integer>(); + List<Integer> transactionNumbers = new ArrayList<>(); AttrData previous = new AttrData(); synchronized (artifact) { if (!artifact.isAttributesLoaded()) { 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 dd2cb8f8d86..599a88c7d25 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 @@ -339,7 +339,7 @@ public class BranchManager { * @throws OseeCoreException */ public static Job deleteBranch(final List<? extends IOseeBranch> branches) { - List<IOperation> ops = new ArrayList<IOperation>(); + List<IOperation> ops = new ArrayList<>(); for (IOseeBranch branch : branches) { ops.add(new DeleteBranchOperation(branch)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java index e3484b4abd9..891fdc28c09 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ChangeArtifactType.java @@ -60,13 +60,13 @@ import org.eclipse.osee.jdbc.JdbcStatement; * @author Jeff C. Phillips */ public class ChangeArtifactType { - private final HashSet<IAttributeType> attributeTypes = new HashSet<IAttributeType>(); - private final HashSet<IRelationType> relationTypes = new HashSet<IRelationType>(); - private final HashMap<IOseeBranch, SkynetTransaction> txMap = new HashMap<IOseeBranch, SkynetTransaction>(); - private final Set<EventBasicGuidArtifact> artifactChanges = new HashSet<EventBasicGuidArtifact>(); - private final List<Artifact> modifiedArtifacts = new ArrayList<Artifact>(); + private final HashSet<IAttributeType> attributeTypes = new HashSet<>(); + private final HashSet<IRelationType> relationTypes = new HashSet<>(); + private final HashMap<IOseeBranch, SkynetTransaction> txMap = new HashMap<>(); + private final Set<EventBasicGuidArtifact> artifactChanges = new HashSet<>(); + private final List<Artifact> modifiedArtifacts = new ArrayList<>(); private static final IStatus promptStatus = new Status(IStatus.WARNING, Activator.PLUGIN_ID, 257, "", null); - private final Map<Integer, Integer> gammaToArtId = new HashMap<Integer, Integer>(); + private final Map<Integer, Integer> gammaToArtId = new HashMap<>(); public static void changeArtifactType(Collection<? extends Artifact> inputArtifacts, IArtifactType newArtifactTypeToken, boolean prompt) throws OseeCoreException { @@ -241,7 +241,7 @@ public class ChangeArtifactType { } private void changeArtifactTypeOutsideofHistory(Collection<? extends Artifact> inputArtifacts, ArtifactType newArtifactType) throws OseeCoreException { - List<Object[]> insertData = new ArrayList<Object[]>(); + List<Object[]> insertData = new ArrayList<>(); String UPDATE = "UPDATE osee_artifact SET art_type_id = ? WHERE art_id = ?"; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java index 22135632399..5934827c461 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/IntroduceArtifactOperation.java @@ -59,7 +59,7 @@ public class IntroduceArtifactOperation { public List<Artifact> introduce(Collection<Artifact> sourceArtifacts) throws OseeCoreException { this.sourceArtifacts = sourceArtifacts; - destinationArtifacts = new ArrayList<Artifact>(sourceArtifacts.size()); + destinationArtifacts = new ArrayList<>(sourceArtifacts.size()); for (Artifact sourceArtifact : sourceArtifacts) { introduceArtifact(sourceArtifact); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/KeyValueArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/KeyValueArtifact.java index 85e669ad692..828a9400b2a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/KeyValueArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/KeyValueArtifact.java @@ -36,7 +36,7 @@ public class KeyValueArtifact { this.keyValueAttributeType = keyValueAttributeType; load(); } - protected HashCollection<String, String> keyValueMap = new HashCollection<String, String>(20); + protected HashCollection<String, String> keyValueMap = new HashCollection<>(20); private final Pattern keyValuePattern = Pattern.compile("^(.*?)=(.*)$", Pattern.MULTILINE | Pattern.DOTALL); public HashCollection<String, String> getHashCollection() { @@ -49,7 +49,7 @@ public class KeyValueArtifact { public void save() throws OseeCoreException { if (keyValueMap.size() > 0) { - Set<String> keyValues = new HashSet<String>(); + Set<String> keyValues = new HashSet<>(); for (String key : keyValueMap.keySet()) { for (String value : keyValueMap.getValues(key)) { keyValues.add(key + "=" + value); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java index af5f4667307..b3ff9d37160 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeArtifacts.java @@ -62,7 +62,7 @@ public class PurgeArtifacts extends AbstractDbTxOperation { public PurgeArtifacts(Collection<? extends Artifact> artifactsToPurge, boolean recurseChildrenBranches) throws OseeCoreException { super(ConnectionHandler.getJdbcClient(), "Purge Artifact", Activator.PLUGIN_ID); - this.artifactsToPurge = new LinkedList<Artifact>(artifactsToPurge); + this.artifactsToPurge = new LinkedList<>(artifactsToPurge); this.success = false; this.recurseChildrenBranches = recurseChildrenBranches; } @@ -76,7 +76,7 @@ public class PurgeArtifacts extends AbstractDbTxOperation { checkPurgeValid(connection); // now load the artifacts to be purged - Set<Artifact> childreArtifactsToPurge = new HashSet<Artifact>(); + Set<Artifact> childreArtifactsToPurge = new HashSet<>(); for (Artifact art : artifactsToPurge) { childreArtifactsToPurge.addAll(art.getDescendants(DeletionFlag.INCLUDE_DELETED)); } @@ -127,7 +127,7 @@ public class PurgeArtifacts extends AbstractDbTxOperation { @Override protected void handleTxFinally(IProgressMonitor monitor) throws OseeCoreException { if (success) { - Set<EventBasicGuidArtifact> artifactChanges = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> artifactChanges = new HashSet<>(); for (Artifact artifact : artifactsToPurge) { artifactChanges.add(new EventBasicGuidArtifact(EventModType.Purged, artifact)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeAttributes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeAttributes.java index 896bccaf0e5..4c0022727a7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeAttributes.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/PurgeAttributes.java @@ -99,7 +99,7 @@ public class PurgeAttributes extends AbstractDbTxOperation { protected void handleTxFinally(IProgressMonitor monitor) throws OseeCoreException { super.handleTxFinally(monitor); if (success) { - Set<EventBasicGuidArtifact> artifactChanges = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> artifactChanges = new HashSet<>(); for (Attribute<?> attribute : attributesToPurge) { artifactChanges.add(new EventBasicGuidArtifact(EventModType.Purged, attribute.getArtifact())); } 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 67b65602488..a127146233b 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 @@ -37,13 +37,13 @@ public class UniversalGroup { artifacts = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.UniversalGroup, branch); } catch (OseeCoreException ex) { OseeLog.log(Activator.class, Level.SEVERE, ex); - artifacts = new LinkedList<Artifact>(); + artifacts = new LinkedList<>(); } return artifacts; } public static Collection<Artifact> getGroupsNotRoot(IOseeBranch branch) { - Collection<Artifact> groups = new HashSet<Artifact>(); + Collection<Artifact> groups = new HashSet<>(); for (Artifact group : UniversalGroup.getGroups(branch)) { if (!group.getName().equals("Root Artifact")) { groups.add(group); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java index c2cb146bfbb..ff8152d57ec 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/UpdateMergeBranch.java @@ -75,7 +75,7 @@ public class UpdateMergeBranch extends AbstractDbTxOperation { protected void doTxWork(IProgressMonitor monitor, JdbcConnection connection) throws OseeCoreException { Collection<Integer> allMergeBranchArtifacts = getAllMergeArtifacts(mergeBranch); long time = System.currentTimeMillis(); - Collection<Integer> allMergeBranchArtifactsCopy = new HashSet<Integer>(allMergeBranchArtifacts); + Collection<Integer> allMergeBranchArtifactsCopy = new HashSet<>(allMergeBranchArtifacts); Collection<Artifact> goodMergeBranchArtifacts = ArtifactQuery.getArtifactListFromBranch(mergeBranch, INCLUDE_DELETED); @@ -188,7 +188,7 @@ public class UpdateMergeBranch extends AbstractDbTxOperation { } private Collection<Integer> getAllMergeArtifacts(Branch branch) throws OseeCoreException { - Collection<Integer> artSet = new HashSet<Integer>(); + Collection<Integer> artSet = new HashSet<>(); long time = System.currentTimeMillis(); JdbcStatement chStmt = getJdbcClient().getStatement(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/AbstractArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/AbstractArtifactCache.java index 7d8fe3fead7..abe41dc22c5 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/AbstractArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/AbstractArtifactCache.java @@ -32,8 +32,8 @@ public abstract class AbstractArtifactCache { } protected AbstractArtifactCache(int initialCapacity) { - idCache = new CompositeKeyHashMap<Integer, Long, Object>(initialCapacity, true); - guidCache = new CompositeKeyHashMap<String, Long, Object>(initialCapacity, true); + idCache = new CompositeKeyHashMap<>(initialCapacity, true); + guidCache = new CompositeKeyHashMap<>(initialCapacity, true); } public Object cache(Artifact artifact) { @@ -69,7 +69,7 @@ public abstract class AbstractArtifactCache { } private Collection<Artifact> getItems(FilterType filterType) { - Collection<Artifact> artifacts = new HashSet<Artifact>(); + Collection<Artifact> artifacts = new HashSet<>(); for (Entry<Pair<String, Long>, Object> entry : guidCache.entrySet()) { Artifact art = asArtifact(entry.getValue()); if (!isFiltered(art, filterType)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java index 155d3ea4da7..d485ccaa05e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/cache/ActiveArtifactCache.java @@ -34,9 +34,9 @@ public class ActiveArtifactCache extends AbstractArtifactCache { public ActiveArtifactCache(int initialCapacity) { super(initialCapacity); - byArtifactTypeCache = new CompositeKeyHashMap<IArtifactType, ArtifactKey, Object>(initialCapacity, true); + byArtifactTypeCache = new CompositeKeyHashMap<>(initialCapacity, true); - keyedArtifactCache = new CompositeKeyHashMap<String, IOseeBranch, Set<Object>>(200, true); + keyedArtifactCache = new CompositeKeyHashMap<>(200, true); } @Override @@ -70,7 +70,7 @@ public class ActiveArtifactCache extends AbstractArtifactCache { } public List<Artifact> getByType(IArtifactType artifactType) { - List<Artifact> items = new ArrayList<Artifact>(); + List<Artifact> items = new ArrayList<>(); Collection<Object> cachedItems = byArtifactTypeCache.getValues(artifactType); if (cachedItems != null) { for (Object obj : cachedItems) { @@ -123,7 +123,7 @@ public class ActiveArtifactCache extends AbstractArtifactCache { cache(artifact); Set<Object> objects = keyedArtifactCache.get(key, artifact.getBranch()); if (objects == null) { - objects = new HashSet<Object>(); + objects = new HashSet<>(); keyedArtifactCache.put(key, artifact.getBranch(), objects); } if (objects.contains(artifact)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/checks/AssociatedArtifactCheck.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/checks/AssociatedArtifactCheck.java index b7813df3dc7..5be3967481c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/checks/AssociatedArtifactCheck.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/checks/AssociatedArtifactCheck.java @@ -31,7 +31,7 @@ public class AssociatedArtifactCheck extends ArtifactCheck { @Override public IStatus isDeleteable(Collection<Artifact> artifacts) throws OseeCoreException { - List<Integer> artIdsToCheck = new LinkedList<Integer>(); + List<Integer> artIdsToCheck = new LinkedList<>(); for (Artifact art : artifacts) { if (art.getBranch().equals(CoreBranches.COMMON)) { artIdsToCheck.add(art.getArtId()); 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 0858ad6f76d..f4b998ca835 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 @@ -61,7 +61,7 @@ public final class ArtifactFactoryManager { public static synchronized Collection<IArtifactType> getEternalArtifactTypes() { if (eternalArtifactTypes == null) { - eternalArtifactTypes = new HashSet<IArtifactType>(); + eternalArtifactTypes = new HashSet<>(); for (ArtifactFactory factory : getFactories()) { eternalArtifactTypes.addAll(factory.getEternalArtifactTypes()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactMatch.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactMatch.java index 5969c38f010..6f97619d6cc 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactMatch.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactMatch.java @@ -21,7 +21,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact; */ public class ArtifactMatch { private final Artifact artifact; - private final HashCollection<Integer, MatchLocation> matchData = new HashCollection<Integer, MatchLocation>(); + private final HashCollection<Integer, MatchLocation> matchData = new HashCollection<>(); public ArtifactMatch(Artifact artifact) { this.artifact = artifact; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java index b1ac3c99ee9..fb311ed7647 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQuery.java @@ -526,7 +526,7 @@ public class ArtifactQuery { Collection<IAttributeType> typesToSearch = attributeTypes.length == 0 ? Collections.singleton( QueryBuilder.ANY_ATTRIBUTE_TYPE) : Arrays.asList(attributeTypes); queryBuilder.and(typesToSearch, queryString, matchCase, matchWordOrder); - List<Artifact> toReturn = new LinkedList<Artifact>(); + List<Artifact> toReturn = new LinkedList<>(); for (Artifact art : queryBuilder.getResults()) { toReturn.add(art); } @@ -578,8 +578,8 @@ public class ArtifactQuery { } public static Collection<? extends Artifact> reloadArtifacts(Collection<? extends Artifact> artifacts, boolean sendRemoteEvent) throws OseeCoreException { - Collection<Artifact> reloadedArts = new ArrayList<Artifact>(artifacts.size()); - HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<IOseeBranch, Artifact>(); + Collection<Artifact> reloadedArts = new ArrayList<>(artifacts.size()); + HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<>(); if (artifacts.isEmpty()) { return artifacts; } @@ -587,7 +587,7 @@ public class ArtifactQuery { // separate/group artifacts by branch since ArtifactQueryBuilder only supports a single branch branchMap.put(artifact.getBranch(), artifact); } - Set<Integer> artIds = new HashSet<Integer>(); + Set<Integer> artIds = new HashSet<>(); for (Entry<IOseeBranch, Collection<Artifact>> entrySet : branchMap.entrySet()) { for (Artifact artifact : entrySet.getValue()) { @@ -716,7 +716,7 @@ public class ArtifactQuery { DeletionFlag deletionFlag = searchParameters.isIncludeDeleted() ? DeletionFlag.INCLUDE_DELETED : DeletionFlag.EXCLUDE_DELETED; - Map<Integer, Artifact> artIdToArtifact = new HashMap<Integer, Artifact>(); + Map<Integer, Artifact> artIdToArtifact = new HashMap<>(); List<Artifact> loadedArtifacts = ArtifactLoader.loadArtifacts(result.getIds(), branch, LoadLevel.ALL, INCLUDE_CACHE, deletionFlag, tx); @@ -725,7 +725,7 @@ public class ArtifactQuery { artIdToArtifact.put(art.getArtId(), art); } - Map<Artifact, ArtifactMatch> matches = new HashMap<Artifact, ArtifactMatch>(); + Map<Artifact, ArtifactMatch> matches = new HashMap<>(); for (SearchMatch match : result.getSearchMatches()) { int artId = match.getArtId(); int attrId = match.getAttrId(); @@ -746,7 +746,7 @@ public class ArtifactQuery { public static Long getUuidFromGuid(String guid, IOseeBranch branch) { if (guidToUuid == null) { - guidToUuid = new HashMap<String, Long>(200); + guidToUuid = new HashMap<>(200); } Long result = null; if (guidToUuid.containsKey(guid)) { @@ -763,7 +763,7 @@ public class ArtifactQuery { public static String getGuidFromUuid(long uuid, IOseeBranch branch) { if (uuidToGuid == null) { - uuidToGuid = new HashMap<Long, String>(200); + uuidToGuid = new HashMap<>(200); } String result = null; if (uuidToGuid.containsKey(uuid)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java index 02fcb85cdb2..48ab3f7d7e8 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/ArtifactQueryBuilder.java @@ -165,7 +165,7 @@ public class ArtifactQueryBuilder { if (guids.size() == 1) { this.guid = guids.get(0); } else { - this.guids = new ArrayList<String>(); + this.guids = new ArrayList<>(); for (String id : guids) { if (GUID.isValid(id)) { this.guids.add(id); @@ -356,7 +356,7 @@ public class ArtifactQueryBuilder { private static final class LocalIdQueryBuilder implements InvocationHandler { - private final Set<Integer> localIds = new LinkedHashSet<Integer>(); + private final Set<Integer> localIds = new LinkedHashSet<>(); private DeletionFlag allowDeleted = EXCLUDE_DELETED; private int txId = -1; private final IOseeBranch branch; @@ -413,7 +413,7 @@ public class ArtifactQueryBuilder { @SuppressWarnings("unused") public SearchResult getSearchResult() throws OseeCoreException { SearchResponse response = new SearchResponse(); - List<Integer> ids = new LinkedList<Integer>(localIds); + List<Integer> ids = new LinkedList<>(localIds); response.setIds(ids); return response; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchOptions.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchOptions.java index 00c50d02b77..9701ceebd0c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchOptions.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/search/SearchOptions.java @@ -21,8 +21,8 @@ import org.eclipse.osee.framework.core.enums.DeletionFlag; */ public class SearchOptions { - private final Collection<IAttributeType> attributeTypeGuids = new HashSet<IAttributeType>(); - private final Collection<IArtifactType> artifactTypeGuids = new HashSet<IArtifactType>(); + private final Collection<IAttributeType> attributeTypeGuids = new HashSet<>(); + private final Collection<IArtifactType> artifactTypeGuids = new HashSet<>(); private DeletionFlag deletionFlag; private boolean isMatchWordOrder; private boolean isCaseSensive; 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 567a8bc2cac..4a236951b1d 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 @@ -106,7 +106,7 @@ public class AttributeExtensionManager { } private Map<String, Pair<String, String>> loadExtensions(String extensionPointId, String[] elementNames, String classNameAttribute) throws OseeStateException { - Map<String, Pair<String, String>> toReturn = new HashMap<String, Pair<String, String>>(); + Map<String, Pair<String, String>> toReturn = new HashMap<>(); for (String elementName : elementNames) { List<IConfigurationElement> elements = ExtensionPoints.getExtensionElements(extensionPointId, elementName); for (IConfigurationElement element : elements) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java index a8838a6d092..9e02e0828d7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/AttributeTypeManager.java @@ -54,7 +54,7 @@ public class AttributeTypeManager { public static Collection<IAttributeType> getValidAttributeTypes(IOseeBranch branchToken) throws OseeCoreException { Branch branch = getBranchCache().get(branchToken); - Set<IAttributeType> attributeTypes = new HashSet<IAttributeType>(100); + Set<IAttributeType> attributeTypes = new HashSet<>(100); for (ArtifactType artifactType : ArtifactTypeManager.getAllTypes()) { attributeTypes.addAll(artifactType.getAttributeTypes(branch)); } @@ -66,7 +66,7 @@ public class AttributeTypeManager { } public static Collection<IAttributeType> getTaggableTypes() throws OseeCoreException { - Collection<IAttributeType> taggableTypes = new ArrayList<IAttributeType>(); + Collection<IAttributeType> taggableTypes = new ArrayList<>(); for (AttributeType type : getAllTypes()) { if (type.isTaggable()) { taggableTypes.add(type); @@ -76,7 +76,7 @@ public class AttributeTypeManager { } public static Collection<IAttributeType> getSingleMultiplicityTypes() throws OseeCoreException { - Collection<IAttributeType> types = new ArrayList<IAttributeType>(); + Collection<IAttributeType> types = new ArrayList<>(); for (AttributeType type : getAllTypes()) { if (type.getMaxOccurrences() == 1) { types.add(type); @@ -132,7 +132,7 @@ public class AttributeTypeManager { } public static Map<String, String> getEnumerationValueDescriptions(IAttributeType attributeType) throws OseeCoreException { - Map<String, String> values = new HashMap<String, String>(); + Map<String, String> values = new HashMap<>(); for (OseeEnumEntry entry : AttributeTypeManager.getType(attributeType).getOseeEnumType().values()) { values.put(entry.getName(), entry.getDescription()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumTypeManager.java index e74b677899f..88a2cc475d4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/OseeEnumTypeManager.java @@ -45,7 +45,7 @@ public class OseeEnumTypeManager { } public static Collection<String> getAllTypeNames() throws OseeCoreException { - List<String> items = new ArrayList<String>(); + List<String> items = new ArrayList<>(); for (OseeEnumType types : getAllTypes()) { items.add(types.getName()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/AttributeAdapterServiceImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/AttributeAdapterServiceImpl.java index 064e75be7ae..b8977aac990 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/AttributeAdapterServiceImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/attribute/service/AttributeAdapterServiceImpl.java @@ -37,10 +37,10 @@ public class AttributeAdapterServiceImpl implements AttributeAdapterService { private Thread thread; public AttributeAdapterServiceImpl() { - registered = new ConcurrentHashMap<String, AttributeAdapter<?>>(); - pending = new CopyOnWriteArrayList<ServiceReference<AttributeAdapter<?>>>(); + registered = new ConcurrentHashMap<>(); + pending = new CopyOnWriteArrayList<>(); - adapterByType = new ConcurrentHashMap<IAttributeType, AttributeAdapter<?>>(); + adapterByType = new ConcurrentHashMap<>(); } public void start() { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeWorker.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeWorker.java index df18062a51e..1a77dea2c93 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeWorker.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/change/RelationChangeWorker.java @@ -92,7 +92,7 @@ public class RelationChangeWorker implements IChangeWorker { RelationOrderData relationOrderData = new RelationOrderFactory().createRelationOrderData(otherSideCurrent); - List<String> guids = new ArrayList<String>(); + List<String> guids = new ArrayList<>(); for (Entry<Pair<String, String>, Pair<String, List<String>>> relationOrderGuidData : relationOrderData.entrySet()) { guids.addAll(relationOrderGuidData.getValue().getSecond()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java index e1ec1dbed4f..3045f9df072 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/commit/actions/CatchTrackedChanges.java @@ -42,8 +42,8 @@ public class CatchTrackedChanges implements CommitAction { @Override public void runCommitAction(IOseeBranch sourceBranch, IOseeBranch destinationBranch) throws OseeCoreException { - Set<Artifact> changedArtifacts = new HashSet<Artifact>(); - Collection<Change> changes = new ArrayList<Change>(); + Set<Artifact> changedArtifacts = new HashSet<>(); + Collection<Change> changes = new ArrayList<>(); IOperation operation = ChangeManager.compareTwoBranchesHead(sourceBranch, destinationBranch, changes); Operations.executeWorkAndCheckStatus(operation); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java index 18e1220d57c..b86d1c68e6d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/conflict/ConflictManagerExternal.java @@ -51,7 +51,7 @@ public class ConflictManagerExternal { } public List<Conflict> getRemainingConflicts() throws OseeCoreException { - List<Conflict> remainingConflicts = new ArrayList<Conflict>(); + List<Conflict> remainingConflicts = new ArrayList<>(); for (Conflict conflict : getOriginalConflicts()) { ConflictStatus status = conflict.getStatus(); if (!status.isResolved() && !status.isCommitted() && !status.isInformational()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java index 5863882c080..addf8134422 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/FrameworkEventUtil.java @@ -295,7 +295,7 @@ public final class FrameworkEventUtil { } public static EventModifiedBasicGuidArtifact getEventModifiedBasicGuidArtifact(EventModType modType, RemoteBasicGuidArtifact1 remGuidArt) { - List<AttributeChange> attributeChanges = new ArrayList<AttributeChange>(); + List<AttributeChange> attributeChanges = new ArrayList<>(); for (RemoteAttributeChange1 remAttrChg : remGuidArt.getAttributes()) { attributeChanges.add(getAttributeChange(remAttrChg)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java index d0861c33f94..c677e42de7f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/OseeEventManager.java @@ -161,7 +161,7 @@ public final class OseeEventManager { public static List<IEventFilter> getEventFiltersForBranch(final IOseeBranch branch) { try { - List<IEventFilter> eventFilters = new ArrayList<IEventFilter>(2); + List<IEventFilter> eventFilters = new ArrayList<>(2); eventFilters.add(new BranchUuidEventFilter(branch)); return eventFilters; } catch (Exception ex) { 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 22ef9ac601a..b0437568a99 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 @@ -46,7 +46,7 @@ public final class PurgeTransactionEventUtil { public static void handleRemotePurgeTransactionEvent(TransactionEvent transEvent) { if (transEvent.getEventType() == TransactionEventType.Purged) { - Set<Artifact> artifactsInCache = new HashSet<Artifact>(); + Set<Artifact> artifactsInCache = new HashSet<>(); for (TransactionChange transChange : transEvent.getTransactionChanges()) { try { TransactionManager.deCache(transChange.getTransactionId()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java index 35755504313..7cc9c561110 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AccessControlEvent.java @@ -38,7 +38,7 @@ public class AccessControlEvent implements FrameworkEvent, HasNetworkSender, Has */ public List<DefaultBasicGuidArtifact> getArtifacts() { if (artifacts == null) { - artifacts = new ArrayList<DefaultBasicGuidArtifact>(); + artifacts = new ArrayList<>(); } return this.artifacts; } 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 f81d48b70db..46db24ea1bd 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 @@ -38,8 +38,8 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { private final Long branchUuid; private int transactionId; private NetworkSender networkSender; - private final List<EventBasicGuidArtifact> artifacts = new ArrayList<EventBasicGuidArtifact>(); - private final List<EventBasicGuidRelation> relations = new ArrayList<EventBasicGuidRelation>(); + private final List<EventBasicGuidArtifact> artifacts = new ArrayList<>(); + private final List<EventBasicGuidRelation> relations = new ArrayList<>(); private final Set<DefaultBasicUuidRelationReorder> relationReorderRecords = new HashSet<DefaultBasicUuidRelationReorder>(); private final ArtifactEventType reloadEvent; @@ -152,7 +152,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { } private Collection<DefaultBasicGuidArtifact> getRelOrderChangedArtifacts(IRelationType... relationTypes) { - Set<DefaultBasicGuidArtifact> guidArts = new HashSet<DefaultBasicGuidArtifact>(); + Set<DefaultBasicGuidArtifact> guidArts = new HashSet<>(); for (DefaultBasicUuidRelationReorder record : relationReorderRecords) { if (relationTypes == null) { guidArts.add(record.getParentArt()); @@ -168,7 +168,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { } public Collection<EventBasicGuidArtifact> get(EventModType... eventModTypes) { - Set<EventBasicGuidArtifact> guidArts = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> guidArts = new HashSet<>(); for (EventBasicGuidArtifact guidArt : artifacts) { for (EventModType modType : eventModTypes) { if (guidArt.getModType() == modType) { @@ -180,7 +180,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { } private Collection<IBasicGuidArtifact> getRelationsArts(RelationEventType... eventModTypes) { - Set<IBasicGuidArtifact> guidArts = new HashSet<IBasicGuidArtifact>(); + Set<IBasicGuidArtifact> guidArts = new HashSet<>(); for (EventBasicGuidRelation guidRel : getRelations(eventModTypes)) { guidArts.add(guidRel.getArtA()); guidArts.add(guidRel.getArtB()); @@ -189,7 +189,7 @@ public class ArtifactEvent implements FrameworkEvent, HasNetworkSender { } private Collection<EventBasicGuidRelation> getRelations(RelationEventType... eventModTypes) { - Set<EventBasicGuidRelation> guidRels = new HashSet<EventBasicGuidRelation>(); + Set<EventBasicGuidRelation> guidRels = new HashSet<>(); for (EventBasicGuidRelation guidRel : relations) { for (RelationEventType modType : eventModTypes) { if (guidRel.getModType() == modType) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java index 0a3f435a37e..8a53af2368b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/AttributeChange.java @@ -133,7 +133,7 @@ public class AttributeChange implements FrameworkEvent { */ public List<String> getData() { if (data == null) { - data = new ArrayList<String>(); + data = new ArrayList<>(); } return this.data; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidArtifact.java index c47742719b4..012aa1481c1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/EventBasicGuidArtifact.java @@ -54,7 +54,7 @@ public class EventBasicGuidArtifact extends DefaultBasicGuidArtifact { if (eventModType == EventModType.ChangeType) { throw new OseeArgumentException("Can't be used for ChangeType"); } - Set<EventBasicGuidArtifact> eventArts = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> eventArts = new HashSet<>(); for (IBasicGuidArtifact guidArt : basicGuidArtifacts) { eventArts.add(new EventBasicGuidArtifact(eventModType, guidArt)); } @@ -65,7 +65,7 @@ public class EventBasicGuidArtifact extends DefaultBasicGuidArtifact { if (eventModType == EventModType.ChangeType) { throw new OseeArgumentException("Can't be used for ChangeType"); } - Set<EventBasicGuidArtifact> eventArts = new HashSet<EventBasicGuidArtifact>(); + Set<EventBasicGuidArtifact> eventArts = new HashSet<>(); for (RemoteBasicGuidArtifact1 guidArt : basicGuidArtifacts) { eventArts.add(new EventBasicGuidArtifact(eventModType, FrameworkEventUtil.getBranchUuidFromRemoteEvent(guidArt.getBranchGuid()), guidArt.getArtTypeGuid(), diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionChange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionChange.java index a25e914f787..6f2c7d71e7c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionChange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionChange.java @@ -19,7 +19,7 @@ public class TransactionChange implements FrameworkEvent { private long branchUuid; private int transactionId; - private final Set<DefaultBasicGuidArtifact> artifacts = new HashSet<DefaultBasicGuidArtifact>(); + private final Set<DefaultBasicGuidArtifact> artifacts = new HashSet<>(); /** * Gets the value of the branchUuid property. diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEvent.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEvent.java index 49dd84a0ab3..dd39ff520e7 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEvent.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/event/model/TransactionEvent.java @@ -18,7 +18,7 @@ public class TransactionEvent implements FrameworkEvent, HasNetworkSender { private TransactionEventType eventType; private NetworkSender networkSender; - private final List<TransactionChange> transactions = new ArrayList<TransactionChange>(); + private final List<TransactionChange> transactions = new ArrayList<>(); /** * Gets the value of the artifacts property. diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/HttpBranchExchange.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/HttpBranchExchange.java index 1f0a74c001c..a288d21011f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/HttpBranchExchange.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/exportImport/HttpBranchExchange.java @@ -34,7 +34,7 @@ public class HttpBranchExchange { options.setAllAsRootBranches(allAsRootBranches); if (branchUuids != null && branchUuids.length > 0) { - List<Long> ids = new ArrayList<Long>(); + List<Long> ids = new ArrayList<>(); for (Long entry : branchUuids) { ids.add(entry); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientDashboardRequestHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientDashboardRequestHandler.java index f1247a741bc..424ffd03417 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientDashboardRequestHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/ClientDashboardRequestHandler.java @@ -98,7 +98,7 @@ public class ClientDashboardRequestHandler implements IHttpServerRequest { } private List<File> getLogFiles() { - List<File> files = new ArrayList<File>(); + List<File> files = new ArrayList<>(); File file = Platform.getLogFileLocation().removeFileExtension().toFile(); file = new File(file, ".bak_0.log"); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java index d95ee3a5556..7827984ee0c 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/CommitBranchHttpRequestOperation.java @@ -144,7 +144,7 @@ public final class CommitBranchHttpRequestOperation extends AbstractOperation { BranchManager.reloadBranch(sourceBranch.getUuid()); if (!skipChecksAndEvents) { - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); IOperation operation = ChangeManager.comparedToPreviousTx(newTransaction, changes); doSubWork(operation, monitor, 1.0); handleArtifactEvents(newTransaction, changes); @@ -158,8 +158,8 @@ public final class CommitBranchHttpRequestOperation extends AbstractOperation { ArtifactEvent artifactEvent = new ArtifactEvent(newTransaction.getBranch()); artifactEvent.setTransactionId(newTransaction.getId()); - Map<Integer, EventModifiedBasicGuidArtifact> artEventMap = new HashMap<Integer, EventModifiedBasicGuidArtifact>(); - Set<Artifact> artifacts = new HashSet<Artifact>(); + Map<Integer, EventModifiedBasicGuidArtifact> artEventMap = new HashMap<>(); + Set<Artifact> artifacts = new HashSet<>(); for (Change change : changes) { LoadChangeType changeType = change.getChangeType(); 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 80ba9ca386a..95331a2b1d8 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 @@ -40,7 +40,7 @@ public class ArtifactExtractorContributionManager { } public List<IArtifactExtractorDelegate> getAllDelegates() { - List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<IArtifactExtractorDelegate>(); + List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<>(); ExtensionDefinedObjects<IArtifactExtractorDelegate> contributions = new ExtensionDefinedObjects<IArtifactExtractorDelegate>(PARSER_DELEGATE_EXTENSION, PARSER_DELEGATE_ELEMENT, CLASS_NAME_ATTRIBUTE, true); @@ -51,7 +51,7 @@ public class ArtifactExtractorContributionManager { } public List<IArtifactExtractorDelegate> getDelegates(IArtifactExtractor parser) { - List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<IArtifactExtractorDelegate>(); + List<IArtifactExtractorDelegate> contentHandlers = new ArrayList<>(); if (parser != null) { for (IArtifactExtractorDelegate delegate : getAllDelegates()) { if (delegate.isApplicable(parser)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java index 95971600c5b..6ee81915cc8 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/RoughArtifact.java @@ -40,7 +40,7 @@ public class RoughArtifact { public RoughArtifact(RoughArtifactKind roughArtifactKind, String name) { this.attributes = new RoughAttributeSet(); - this.children = new ArrayList<RoughArtifact>(); + this.children = new ArrayList<>(); this.roughArtifactKind = roughArtifactKind; setName(name); } @@ -172,7 +172,7 @@ public class RoughArtifact { } public Collection<RoughArtifact> getDescendants() { - Collection<RoughArtifact> decendants = new ArrayList<RoughArtifact>(); + Collection<RoughArtifact> decendants = new ArrayList<>(); for (RoughArtifact child : getChildren()) { if (equals(child.roughParent)) { decendants.add(child); 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 ab1aa3cc83b..73438cf543d 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 @@ -57,14 +57,14 @@ public final class RoughAttributeSet implements Iterable<Entry<CaseInsensitiveSt CaseInsensitiveString key = new CaseInsensitiveString(name); Collection<RoughAttribute> collection = attributes.get(key); if (collection == null) { - collection = new LinkedList<RoughAttribute>(); + collection = new LinkedList<>(); attributes.put(key, collection); } collection.add(attr); } public Set<String> getAttributeTypeNames() { - Set<String> typeNames = new LinkedHashSet<String>(); + Set<String> typeNames = new LinkedHashSet<>(); for (CharSequence attrTypeName : attributes.keySet()) { typeNames.add(attrTypeName.toString()); } @@ -93,7 +93,7 @@ public final class RoughAttributeSet implements Iterable<Entry<CaseInsensitiveSt if (roughAttributes == null) { return null; } - Collection<String> values = new ArrayList<String>(); + Collection<String> values = new ArrayList<>(); for (RoughAttribute attribute : roughAttributes) { if (!attribute.hasURI()) { values.add(attribute.getValue()); @@ -103,7 +103,7 @@ public final class RoughAttributeSet implements Iterable<Entry<CaseInsensitiveSt } public Collection<URI> getURIAttributes() { - Collection<URI> values = new ArrayList<URI>(); + Collection<URI> values = new ArrayList<>(); for (Collection<RoughAttribute> attributeSets : attributes.values()) { for (RoughAttribute attribute : attributeSets) { if (attribute.hasURI()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java index 3961b721894..95899d47b97 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/FilterArtifactTypesByAttributeTypes.java @@ -54,12 +54,12 @@ public class FilterArtifactTypesByAttributeTypes extends AbstractOperation { @Override protected void doWork(IProgressMonitor monitor) throws Exception { - Set<String> names = new HashSet<String>(); + Set<String> names = new HashSet<>(); for (RoughArtifact artifact : collector.getRoughArtifacts()) { names.addAll(artifact.getAttributeTypeNames()); } selectedArtifactTypes.clear(); - Set<IAttributeType> requiredTypes = new HashSet<IAttributeType>(); + Set<IAttributeType> requiredTypes = new HashSet<>(); for (String name : names) { requiredTypes.add(AttributeTypeManager.getType(name)); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughArtifactCollector.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughArtifactCollector.java index 06a276ca5af..7caab43e8f2 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughArtifactCollector.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughArtifactCollector.java @@ -27,8 +27,8 @@ public class RoughArtifactCollector { public RoughArtifactCollector(RoughArtifact parentRoughArtifact) { this.parentRoughArtifact = parentRoughArtifact; - roughArtifacts = new ArrayList<RoughArtifact>(); - roughRelations = new ArrayList<RoughRelation>(); + roughArtifacts = new ArrayList<>(); + roughRelations = new ArrayList<>(); } public void reset() { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughToRealArtifactOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughToRealArtifactOperation.java index 24ddfd87d2b..d5612078d20 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughToRealArtifactOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/operations/RoughToRealArtifactOperation.java @@ -54,7 +54,7 @@ public class RoughToRealArtifactOperation extends AbstractOperation { this.artifactResolver = artifactResolver; this.destinationArtifact = destinationArtifact; this.importArtifactOrder = RelationOrderBaseTypes.USER_DEFINED; - this.roughToRealArtifact = new HashMap<RoughArtifact, Artifact>(); + this.roughToRealArtifact = new HashMap<>(); this.deleteUnmatchedArtifacts = deleteUnmatchedArtifacts; this.extractor = extractor; roughToRealArtifact.put(rawData.getParentRoughArtifact(), this.destinationArtifact); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java index 819401c6af0..428dd355ba3 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsArtifactExtractor.java @@ -44,7 +44,7 @@ import org.jsoup.nodes.Node; */ public class DoorsArtifactExtractor extends AbstractArtifactExtractor { - private final Vector<String> postProcessGuids = new Vector<String>(); + private final Vector<String> postProcessGuids = new Vector<>(); private String uriDirectoryName = ""; private OperationLogger logger; private final static String NAME_TAG = "<a name="; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsColumnType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsColumnType.java index 54c37847dbf..b89b1fafe3d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsColumnType.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsColumnType.java @@ -37,7 +37,7 @@ public enum DoorsColumnType { OTHER(""); private final String columnType; - private final static Map<String, DoorsColumnType> rawStringToDataType = new HashMap<String, DoorsColumnType>(); + private final static Map<String, DoorsColumnType> rawStringToDataType = new HashMap<>(); static { for (DoorsColumnType enumStatus : DoorsColumnType.values()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsDataType.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsDataType.java index f4c9266fd6e..d91176af2e6 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsDataType.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/DoorsDataType.java @@ -36,7 +36,7 @@ public enum DoorsDataType { private final String _dataType; private final Boolean isSingle; // marks the type as single, that is, not to be combined during processing - private final static Map<String, DoorsDataType> rawStringToDataType = new HashMap<String, DoorsDataType>(); + private final static Map<String, DoorsDataType> rawStringToDataType = new HashMap<>(); static { for (DoorsDataType enumStatus : DoorsDataType.values()) { 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 3ec80737583..d8c99612d3d 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 @@ -37,7 +37,7 @@ public class DoorsTableRowCollector { private final DoorsArtifactExtractor extractor; private final ArrayList<DoorsTableRow> rawRows = Lists.newArrayList(); private final HashMap<DoorsColumnType, Integer> columns = Maps.newHashMap(); - private final Stack<DoorsTableRow> stack = new Stack<DoorsTableRow>(); + private final Stack<DoorsTableRow> stack = new Stack<>(); private final static String UNKNOWN_STRING = "unknown"; public DoorsTableRowCollector(DoorsArtifactExtractor extractor) { @@ -77,7 +77,7 @@ public class DoorsTableRowCollector { public void createArtifacts(RoughArtifactCollector collector) { analyzeRows(); - Queue<DoorsTableRow> queue = new LinkedList<DoorsTableRow>(); + Queue<DoorsTableRow> queue = new LinkedList<>(); DoorsArtifactBuilder dab = new DoorsArtifactBuilder(extractor, this); for (DoorsTableRow dr : getTableRows()) { 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 839302a8361..0661274555f 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 @@ -90,7 +90,7 @@ public class ExcelArtifactExtractor extends AbstractArtifactExtractor { GUID("GUID"), OTHER(""); - private final static Map<String, RowTypeEnum> rawStringToRowType = new HashMap<String, RowTypeEnum>(); + private final static Map<String, RowTypeEnum> rawStringToRowType = new HashMap<>(); public String _rowType; @@ -108,7 +108,7 @@ public class ExcelArtifactExtractor extends AbstractArtifactExtractor { return returnVal != null ? returnVal : OTHER; } } - private final Map<Integer, RowTypeEnum> rowIndexToRowTypeMap = new HashMap<Integer, RowTypeEnum>(); + private final Map<Integer, RowTypeEnum> rowIndexToRowTypeMap = new HashMap<>(); private final Matcher guidMatcher; private final RoughArtifactCollector collector; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java index 0cffa7ba9bc..611ed949cd9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/OutlineResolution.java @@ -86,7 +86,7 @@ public final class OutlineResolution { */ public Set<String> generateNextSet(ReqNumbering lastNumberParagrah) { - Set<String> nextParagraphs = new HashSet<String>(); + Set<String> nextParagraphs = new HashSet<>(); String last = lastNumberParagrah.getNumberString(); if (last.endsWith(".0")) { @@ -117,7 +117,7 @@ public final class OutlineResolution { } - Set<String> dotEnding = new HashSet<String>(nextParagraphs.size()); + Set<String> dotEnding = new HashSet<>(nextParagraphs.size()); for (String next : nextParagraphs) { dotEnding.add(next + "."); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java index 08e76aef651..828d794e50b 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractor.java @@ -59,10 +59,10 @@ public class WordOutlineExtractor extends AbstractArtifactExtractor { private final Matcher reqNumberMatcher = Pattern.compile("(\\d+\\.)*(\\d+\\.?)\\s*").matcher(""); private final Matcher reqListMatcher = Pattern.compile("\\w+\\)", Pattern.CASE_INSENSITIVE).matcher(""); - private final Stack<String> currentListStack = new Stack<String>(); + private final Stack<String> currentListStack = new Stack<>(); private final int maxExtractionDepth = 0; - private Stack<String> clonedCurrentListStack = new Stack<String>(); + private Stack<String> clonedCurrentListStack = new Stack<>(); private int lastDepthNumber; private String headerNumber = ""; private String listIdentifier = ""; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java index a60a56baa06..da8b4d9890e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/parsers/WordOutlineExtractorDelegate.java @@ -79,8 +79,8 @@ public class WordOutlineExtractorDelegate implements IArtifactExtractorDelegate */ @Override public void initialize() { - duplicateCatcher = new HashMap<String, RoughArtifact>(); - roughArtMeta = new HashMap<String, String>(); + duplicateCatcher = new HashMap<>(); + roughArtMeta = new HashMap<>(); lastHeaderNumber = new StringBuffer(); lastHeaderName = new StringBuffer(); lastContent = new StringBuffer(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java index 05e6f78a977..1d02c6f2223 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/AttributeBasedArtifactResolver.java @@ -77,7 +77,7 @@ public class AttributeBasedArtifactResolver extends NewArtifactImportResolver { if (roughParent != null) { List<Artifact> descendants = root.getDescendants(); - Collection<Artifact> candidates = new LinkedList<Artifact>(); + Collection<Artifact> candidates = new LinkedList<>(); System.out.println(String.format("Resolved using: %s", !descendants.isEmpty() ? "root node." : "realParent descendants.")); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/RoughArtifactTranslatorImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/RoughArtifactTranslatorImpl.java index 7e9b27724e8..bd89a266d93 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/RoughArtifactTranslatorImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/importing/resolvers/RoughArtifactTranslatorImpl.java @@ -43,7 +43,7 @@ public class RoughArtifactTranslatorImpl implements IRoughArtifactTranslator { if (attributeType instanceof AttributeType) { AttributeType type = (AttributeType) attributeType; if (type.getBaseAttributeTypeId().contains("Boolean")) { - ArrayList<Boolean> booleanValues = new ArrayList<Boolean>(); + ArrayList<Boolean> booleanValues = new ArrayList<>(); for (String state : values) { Boolean value = new Boolean(state.equalsIgnoreCase("True")); booleanValues.add(value); @@ -57,7 +57,7 @@ public class RoughArtifactTranslatorImpl implements IRoughArtifactTranslator { } } else { Collection<RoughAttribute> roughAttributes = entry.getValue(); - Collection<InputStream> streams = new LinkedList<InputStream>(); + Collection<InputStream> streams = new LinkedList<>(); try { for (RoughAttribute attribute : roughAttributes) { streams.add(attribute.getContent()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java index f140a6a192d..6d401846b48 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/AccessPolicyImpl.java @@ -203,7 +203,7 @@ public class AccessPolicyImpl implements AccessPolicy { java.util.Collections.singleton(relationTypeSide), PermissionEnum.WRITE, level); if (!status.matched()) { - ArrayList<IBasicArtifact<?>> artifacts = new ArrayList<IBasicArtifact<?>>(); + ArrayList<IBasicArtifact<?>> artifacts = new ArrayList<>(); artifacts.add(subject); if (toBeRelated != null) { artifacts.addAll(toBeRelated); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ClientCachingServiceProxy.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ClientCachingServiceProxy.java index 2e36842d65a..5d2488251c0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ClientCachingServiceProxy.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/ClientCachingServiceProxy.java @@ -82,7 +82,7 @@ public class ClientCachingServiceProxy implements IOseeCachingService { attributeTypeCache = new AttributeTypeCache(); relationTypeCache = new RelationTypeCache(); - caches = new ArrayList<IOseeCache<?, ?>>(); + caches = new ArrayList<>(); caches.add(branchCache); caches.add(txCache); caches.add(artifactTypeCache); 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 b7a43271572..dbd35abea08 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 @@ -157,7 +157,7 @@ public class DslToTypeLoader implements TypesLoader { } private void translateSuperTypes(TypeBuffer buffer, ArtifactType targetArtifactType, XArtifactType xArtifactType) throws OseeCoreException { - Set<ArtifactType> oseeSuperTypes = new HashSet<ArtifactType>(); + Set<ArtifactType> oseeSuperTypes = new HashSet<>(); for (XArtifactType xSuperType : xArtifactType.getSuperArtifactTypes()) { String superTypeName = xSuperType.getName(); ArtifactType oseeSuperType = buffer.getArtTypes().getUniqueByName(superTypeName); @@ -180,7 +180,7 @@ public class DslToTypeLoader implements TypesLoader { if (oseeAttributeType != null) { Collection<AttributeType> listOfAllowedAttributes = validAttributes.get(branch); if (listOfAllowedAttributes == null) { - listOfAllowedAttributes = new HashSet<AttributeType>(); + listOfAllowedAttributes = new HashSet<>(); validAttributes.put(branch, listOfAllowedAttributes); } listOfAllowedAttributes.add(oseeAttributeType); @@ -225,7 +225,7 @@ public class DslToTypeLoader implements TypesLoader { public Void caseRemoveAttribute(RemoveAttribute removeOption) { XAttributeType attribute = removeOption.getAttribute(); String guidToMatch = attribute.getUuid(); - List<XAttributeTypeRef> toRemove = new LinkedList<XAttributeTypeRef>(); + List<XAttributeTypeRef> toRemove = new LinkedList<>(); for (XAttributeTypeRef xAttributeTypeRef : validAttributeTypes) { String itemGuid = xAttributeTypeRef.getValidAttributeType().getUuid(); if (guidToMatch.equals(itemGuid)) { @@ -240,7 +240,7 @@ public class DslToTypeLoader implements TypesLoader { public Void caseUpdateAttribute(UpdateAttribute updateAttribute) { XAttributeTypeRef refToUpdate = updateAttribute.getAttribute(); String guidToMatch = refToUpdate.getValidAttributeType().getUuid(); - List<XAttributeTypeRef> toRemove = new LinkedList<XAttributeTypeRef>(); + List<XAttributeTypeRef> toRemove = new LinkedList<>(); for (XAttributeTypeRef xAttributeTypeRef : validAttributeTypes) { String itemGuid = xAttributeTypeRef.getValidAttributeType().getUuid(); if (guidToMatch.equals(itemGuid)) { @@ -271,7 +271,7 @@ public class DslToTypeLoader implements TypesLoader { OseeEnumType oseeEnumType = enumTypeFactory.createOrUpdate(buffer.getEnumTypes(), enumUuid, enumTypeName); int lastOrdinal = 0; - List<OseeEnumEntry> oseeEnumEntries = new ArrayList<OseeEnumEntry>(); + List<OseeEnumEntry> oseeEnumEntries = new ArrayList<>(); for (XOseeEnumEntry xEnumEntry : xEnumType.getEnumEntries()) { String entryName = xEnumEntry.getName(); String ordinal = xEnumEntry.getOrdinal(); @@ -310,7 +310,7 @@ public class DslToTypeLoader implements TypesLoader { public Void caseRemoveEnum(RemoveEnum removeEnum) { XOseeEnumEntry enumEntry = removeEnum.getEnumEntry(); String guidToMatch = enumEntry.getEntryGuid(); - List<XOseeEnumEntry> toRemove = new LinkedList<XOseeEnumEntry>(); + List<XOseeEnumEntry> toRemove = new LinkedList<>(); for (XOseeEnumEntry item : enumEntries) { String itemGuid = item.getEntryGuid(); if (guidToMatch.equals(itemGuid)) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java index f548feca214..ec477f7c025 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/DatabaseBranchAccessor.java @@ -59,10 +59,10 @@ public class DatabaseBranchAccessor implements IOseeDataAccessor<Long, Branch> { @Override public void load(IOseeCache<Long, Branch> cache) throws OseeCoreException { - Map<Branch, Long> childToParent = new HashMap<Branch, Long>(); - Map<Branch, Integer> branchToBaseTx = new HashMap<Branch, Integer>(); - Map<Branch, Integer> branchToSourceTx = new HashMap<Branch, Integer>(); - Map<Branch, Integer> associatedArtifact = new HashMap<Branch, Integer>(); + Map<Branch, Long> childToParent = new HashMap<>(); + Map<Branch, Integer> branchToBaseTx = new HashMap<>(); + Map<Branch, Integer> branchToSourceTx = new HashMap<>(); + Map<Branch, Integer> associatedArtifact = new HashMap<>(); BranchCache brCache = (BranchCache) cache; loadBranches(brCache, childToParent, branchToBaseTx, branchToSourceTx, associatedArtifact); @@ -116,7 +116,7 @@ public class DatabaseBranchAccessor implements IOseeDataAccessor<Long, Branch> { } private void loadBranchRelatedTransactions(BranchCache cache, Map<Branch, Integer> branchToBaseTx, Map<Branch, Integer> branchToSourceTx) throws OseeCoreException { - Set<Integer> transactionIds = new HashSet<Integer>(); + Set<Integer> transactionIds = new HashSet<>(); transactionIds.addAll(branchToSourceTx.values()); transactionIds.addAll(branchToBaseTx.values()); txCache.loadTransactions(transactionIds); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/StoreBranchDatabaseCallable.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/StoreBranchDatabaseCallable.java index 9c1bdf3d7f4..ba6f633b46f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/StoreBranchDatabaseCallable.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/accessors/StoreBranchDatabaseCallable.java @@ -39,9 +39,9 @@ public class StoreBranchDatabaseCallable { public IStatus handleTxWork() throws OseeCoreException { JdbcConnection connection = jdbcClient.getConnection(); try { - List<Object[]> insertData = new ArrayList<Object[]>(); - List<Object[]> updateData = new ArrayList<Object[]>(); - List<Object[]> deleteData = new ArrayList<Object[]>(); + List<Object[]> insertData = new ArrayList<>(); + List<Object[]> updateData = new ArrayList<>(); + List<Object[]> deleteData = new ArrayList<>(); for (Branch branch : branches) { if (isDataDirty(branch)) { 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 aa40a090cca..fa98d58e8a4 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 @@ -31,7 +31,7 @@ public class EventListenerRegistry { private final Map<EventQosType, EventListeners> qosToListeners = new ConcurrentHashMap<EventQosType, EventListeners>(); - private final Set<IEventListener> listenerSet = new HashSet<IEventListener>(); + private final Set<IEventListener> listenerSet = new HashSet<>(); public void addListener(EventQosType qos, IEventListener listener) { if (listener != null) { @@ -99,7 +99,7 @@ public class EventListenerRegistry { @Override public String toString() { - List<String> values = new ArrayList<String>(); + List<String> values = new ArrayList<>(); for (EventQosType type : EventQosType.values()) { EventListeners registry = qosToListeners.get(type); for (Class<? extends FrameworkEvent> clazz : registry.keySet()) { @@ -130,7 +130,7 @@ public class EventListenerRegistry { private void add(Class<? extends FrameworkEvent> clazz, IEventListener listener) { Set<IEventListener> items = eventClassToListeners.get(clazz); if (items == null) { - items = new HashSet<IEventListener>(); + items = new HashSet<>(); eventClassToListeners.put(clazz, items); } synchronized (items) { @@ -181,7 +181,7 @@ public class EventListenerRegistry { if (items == null) { items = Collections.emptySet(); } else { - Collection<D> copy = new HashSet<D>(); + Collection<D> copy = new HashSet<>(); copy.addAll(items); items = copy; } @@ -190,7 +190,7 @@ public class EventListenerRegistry { @SuppressWarnings("unchecked") private Collection<Class<? extends FrameworkEvent>> getCompatibleEvents(IEventListener listener) { - Collection<Class<? extends FrameworkEvent>> events = new HashSet<Class<? extends FrameworkEvent>>(); + Collection<Class<? extends FrameworkEvent>> events = new HashSet<>(); Method[] methods = listener.getClass().getMethods(); if (methods != null) { for (Method method : methods) { 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 cf1704c68f8..0971caecd95 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 @@ -25,7 +25,7 @@ public final class OseeEventThreadFactory implements ThreadFactory { public OseeEventThreadFactory(String threadName, int priority) { this.threadName = threadName; - this.threads = new CopyOnWriteArrayList<WeakReference<Thread>>(); + this.threads = new CopyOnWriteArrayList<>(); this.priority = priority; } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserAdminImpl.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserAdminImpl.java index c8bb92d879e..1bb73af52d4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserAdminImpl.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserAdminImpl.java @@ -150,7 +150,7 @@ public class UserAdminImpl implements UserAdmin { @Override public List<User> getActiveUsers() throws OseeCoreException { Cache<String, User> cache = getCache(); - List<User> activeUsers = new ArrayList<User>(); + List<User> activeUsers = new ArrayList<>(); Iterable<User> all = null; try { all = cache.getAll(); @@ -168,7 +168,7 @@ public class UserAdminImpl implements UserAdmin { @Override public List<User> getUsersAll() throws OseeCoreException { Cache<String, User> cache = getCache(); - List<User> users = new ArrayList<User>(); + List<User> users = new ArrayList<>(); Iterable<User> all = null; try { all = cache.getAll(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserArtifactEventListener.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserArtifactEventListener.java index 1a39758f17b..141786e749d 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserArtifactEventListener.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserArtifactEventListener.java @@ -89,7 +89,7 @@ public class UserArtifactEventListener implements IArtifactEventListener { } private Set<String> getKeysToInvalidate(Collection<Artifact> cacheArtifacts) { - Set<String> keys = new HashSet<String>(); + Set<String> keys = new HashSet<>(); for (Artifact artifact : cacheArtifacts) { if (artifact instanceof User) { User user = (User) artifact; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserDataLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserDataLoader.java index 7623a89e05e..f63be7657a8 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserDataLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/internal/users/UserDataLoader.java @@ -39,7 +39,7 @@ public class UserDataLoader implements CacheDataLoader<String, User> { @Override public Map<String, User> load(Iterable<? extends String> keys) throws OseeCoreException { List<Artifact> artifacts = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.User, CoreBranches.COMMON); - Map<String, User> result = new HashMap<String, User>(); + Map<String, User> result = new HashMap<>(); for (Artifact artifact : artifacts) { User user = (User) artifact; result.put(user.getUserId(), user); 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 4a87496c9fa..c97fd4f6434 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 @@ -40,7 +40,7 @@ public class UserKeysProvider extends LazyObject<Iterable<? extends String>> imp @Override public Iterable<? extends String> call() throws Exception { - Set<String> userIds = new LinkedHashSet<String>(); + Set<String> userIds = new LinkedHashSet<>(); List<Artifact> artifacts = ArtifactQuery.getArtifactListFromType(CoreArtifactTypes.User, CoreBranches.COMMON); for (Artifact artifact : artifacts) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/OseeLinkParser.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/OseeLinkParser.java index 659de9c7e47..3fd8529473e 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/OseeLinkParser.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/OseeLinkParser.java @@ -32,7 +32,7 @@ public final class OseeLinkParser { private final Map<String, String> parameterMap; public OseeLinkParser() { - this.parameterMap = new HashMap<String, String>(); + this.parameterMap = new HashMap<>(); } public void parse(String link) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java index 73ffe2be7c9..76c7691bbaf 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/linking/WordMlLinkHandler.java @@ -147,7 +147,7 @@ public class WordMlLinkHandler { * @return locations where WordMlLinks were found grouped by GUID */ private static HashCollection<String, MatchRange> parseOseeWordMLLinks(String content) throws OseeCoreException { - HashCollection<String, MatchRange> matchMap = new HashCollection<String, MatchRange>(); + HashCollection<String, MatchRange> matchMap = new HashCollection<>(); OseeLinkParser linkParser = new OseeLinkParser(); WORDML_LINK.reset(content); while (WORDML_LINK.find()) { @@ -190,7 +190,7 @@ public class WordMlLinkHandler { } private static List<String> getGuidsNotFound(List<String> guidsFromLinks, List<Artifact> artifactsFound) { - Set<String> artGuids = new HashSet<String>(); + Set<String> artGuids = new HashSet<>(); for (Artifact artifact : artifactsFound) { artGuids.add(artifact.getGuid()); } @@ -201,7 +201,7 @@ public class WordMlLinkHandler { Branch branch = source.getFullBranch(); ChangeSet changeSet = new ChangeSet(original); List<Artifact> artifactsFromSearch = null; - List<String> guidsFromLinks = new ArrayList<String>(matchMap.keySet()); + List<String> guidsFromLinks = new ArrayList<>(matchMap.keySet()); artifactsFromSearch = findArtifacts(source.getTransactionRecord(), source.getBranch(), source.isHistorical(), guidsFromLinks); @@ -209,7 +209,7 @@ public class WordMlLinkHandler { Branch sourceBranch = branch.getParentBranch(); List<String> unknownGuids = getGuidsNotFound(guidsFromLinks, artifactsFromSearch); - List<Artifact> union = new ArrayList<Artifact>(); + List<Artifact> union = new ArrayList<>(); union.addAll(findArtifacts(branch.getSourceTransaction(), sourceBranch, source.isHistorical(), unknownGuids)); union.addAll(artifactsFromSearch); artifactsFromSearch = union; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java index b29aa6f9138..13f8f352fb4 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationCache.java @@ -88,7 +88,7 @@ public class RelationCache { IRelationType relationType = newRelation.getRelationType(); List<RelationLink> selectedRelations = getAllByType(artifact, relationType); if (selectedRelations == null) { - selectedRelations = new CopyOnWriteArrayList<RelationLink>(); + selectedRelations = new CopyOnWriteArrayList<>(); relationsByType.put(new ArtifactKey(artifact), relationType, selectedRelations); } if (selectedRelations.contains(newRelation)) { @@ -110,7 +110,7 @@ public class RelationCache { public List<RelationLink> getRelations(IArtifact artifact, DeletionFlag deletionFlag) { ArtifactKey key = getKey(artifact); - List<RelationLink> linksFound = new ArrayList<RelationLink>(); + List<RelationLink> linksFound = new ArrayList<>(); RelationMatcher matcher = RelationFilterUtil.createMatcher(deletionFlag); findRelations(linksFound, key, matcher); return linksFound; @@ -140,7 +140,7 @@ public class RelationCache { */ public RelationLink getByRelIdOnArtifact(int relLinkId, int aArtifactId, int bArtifactId, IOseeBranch branch) { RelationMatcher relIdMatcher = RelationFilterUtil.createFindFirstRelationLinkIdMatcher(relLinkId); - List<RelationLink> links = new ArrayList<RelationLink>(); + List<RelationLink> links = new ArrayList<>(); findRelations(links, aArtifactId, branch, relIdMatcher); if (links.isEmpty()) { findRelations(links, bArtifactId, branch, relIdMatcher); @@ -149,7 +149,7 @@ public class RelationCache { } public RelationLink getLoadedRelation(IArtifact artifact, int aArtifactId, int bArtifactId, IRelationType relationType, DeletionFlag deletionFlag) { - Set<RelationLink> itemsFound = new HashSet<RelationLink>(); + Set<RelationLink> itemsFound = new HashSet<>(); final int artifactId = artifact.getArtId(); final IOseeBranch branchUuid = artifact.getBranch(); @@ -169,7 +169,7 @@ public class RelationCache { RelationMatcher matcher = RelationFilterUtil.createMatcher(deletionFlag, artIdMatcher); findRelations(itemsFound, artifactId, branchUuid, relationType, matcher); - List<RelationLink> relations = new ArrayList<RelationLink>(); + List<RelationLink> relations = new ArrayList<>(); for (RelationLink relation : itemsFound) { if (relation.getAArtifactId() == aArtifactId && relation.getBArtifactId() == bArtifactId) { relations.add(relation); @@ -187,7 +187,7 @@ public class RelationCache { public RelationLink getLoadedRelation(IRelationType relationType, final int aArtifactId, final int bArtifactId, IOseeBranch branch) { RelationMatcher bArtIdMatcher = RelationFilterUtil.createFindFirstRelatedArtIdMatcher(bArtifactId, RelationSide.SIDE_B); - List<RelationLink> links = new ArrayList<RelationLink>(); + List<RelationLink> links = new ArrayList<>(); findRelations(links, aArtifactId, branch, relationType, bArtIdMatcher); if (links.isEmpty()) { RelationMatcher aArtIdMatcher = diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java index c23c6a381e5..baf0d2fc4d9 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationFilterUtil.java @@ -132,7 +132,7 @@ public class RelationFilterUtil { private static final class CompositeMatcher implements RelationMatcher { - private final List<RelationMatcher> matchers = new ArrayList<RelationMatcher>(); + private final List<RelationMatcher> matchers = new ArrayList<>(); public void add(RelationMatcher matcher) { matchers.add(matcher); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java index 26ac02b34eb..5112bc0dc9f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationManager.java @@ -76,7 +76,7 @@ public class RelationManager { if (artifact != null) { List<RelationLink> artifactsRelations = relationCache.getAll(artifact); if (artifactsRelations == null) { - artifactsRelations = new CopyOnWriteArrayList<RelationLink>(); + artifactsRelations = new CopyOnWriteArrayList<>(); } // Verify that relation is unique by aArtId, bArtId and relTypeId; Needs to be cleaned up in DB, Only log problem. @@ -130,9 +130,9 @@ public class RelationManager { List<Artifact> relatedArtifacts; if (selectedRelations == null) { - relatedArtifacts = new ArrayList<Artifact>(); + relatedArtifacts = new ArrayList<>(); } else { - relatedArtifacts = new ArrayList<Artifact>(selectedRelations.size()); + relatedArtifacts = new ArrayList<>(selectedRelations.size()); Collection<Artifact> bulkLoadedArtifacts = ArtifactQuery.getArtifactListFromIds( @@ -159,7 +159,7 @@ public class RelationManager { } private static Collection<Integer> getRelatedArtifactIds(List<RelationLink> relations, RelationSide side, DeletionFlag allowDeleted) { - Collection<Integer> ret = new HashSet<Integer>(); + Collection<Integer> ret = new HashSet<>(); if (relations != null) { for (RelationLink rel : relations) { if (allowDeleted == INCLUDE_DELETED || allowDeleted == EXCLUDE_DELETED && !rel.isDeleted()) { @@ -177,10 +177,10 @@ public class RelationManager { public static Set<Artifact> getRelatedArtifacts(Collection<? extends Artifact> artifacts, int depth, DeletionFlag allowDeleted, IRelationTypeSide... relationEnums) throws OseeCoreException { findHistoricalArtifacts(artifacts); - Set<Artifact> relatedArtifacts = new HashSet<Artifact>(artifacts.size() * 8); - Collection<Artifact> newArtifactsToSearch = new ArrayList<Artifact>(artifacts); - Collection<Artifact> newArtifacts = new ArrayList<Artifact>(); - Set<Integer> relatedArtIds = new HashSet<Integer>(); + Set<Artifact> relatedArtifacts = new HashSet<>(artifacts.size() * 8); + Collection<Artifact> newArtifactsToSearch = new ArrayList<>(artifacts); + Collection<Artifact> newArtifacts = new ArrayList<>(); + Set<Integer> relatedArtIds = new HashSet<>(); if (artifacts.isEmpty()) { return relatedArtifacts; } @@ -189,7 +189,7 @@ public class RelationManager { for (int i = 0; i < depth && !newArtifactsToSearch.isEmpty(); i++) { relatedArtIds.clear(); for (Artifact artifact : newArtifactsToSearch) { - List<RelationLink> selectedRelations = new ArrayList<RelationLink>(); + List<RelationLink> selectedRelations = new ArrayList<>(); if (relationEnums.length == 0) { /** * since getting relations by type will return the link between this artifact and it's parent, make sure @@ -243,7 +243,7 @@ public class RelationManager { public static List<Artifact> getRelatedArtifacts(Artifact artifact, IRelationTypeSide relationType, DeletionFlag deletionFlag) throws OseeCoreException { List<Artifact> artifacts = getRelatedArtifacts(artifact, relationType, relationType.getSide()); - Collection<Integer> artIds = new ArrayList<Integer>(); + Collection<Integer> artIds = new ArrayList<>(); if (deletionFlag.areDeletedAllowed()) { Object[] formatArgs = relationType.getSide().isSideA() ? new Object[] {"a", "b"} : new Object[] {"b", "a"}; @@ -381,7 +381,7 @@ public class RelationManager { return Collections.emptyList(); } - List<RelationLink> relations = new ArrayList<RelationLink>(selectedRelations.size()); + List<RelationLink> relations = new ArrayList<>(selectedRelations.size()); for (RelationLink relation : selectedRelations) { if (!relation.isDeleted()) { @@ -461,7 +461,7 @@ public class RelationManager { "Artifact [%s] is historical. Historical relations are only supported on the server.", artifact); } List<RelationLink> selectedRelations = relationCache.getAll(artifact); - Set<Pair<IRelationType, RelationSide>> typesToUpdate = new HashSet<Pair<IRelationType, RelationSide>>(); + Set<Pair<IRelationType, RelationSide>> typesToUpdate = new HashSet<>(); if (selectedRelations != null) { for (RelationLink relation : selectedRelations) { typesToUpdate.add(new Pair<IRelationType, RelationSide>(relation.getRelationType(), @@ -504,7 +504,7 @@ public class RelationManager { } Collection<RelationLink> links = relationCache.getAll(artifact); if (!links.isEmpty()) { - List<Object[]> batchArgs = new ArrayList<Object[]>(links.size()); + List<Object[]> batchArgs = new ArrayList<>(links.size()); String PURGE_RELATION = "delete from osee_relation_link WHERE rel_link_id = ?"; for (RelationLink link : links) { batchArgs.add(new Object[] {link.getId()}); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java index 60d45874d99..57e64c001fe 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/RelationTypeManager.java @@ -45,7 +45,7 @@ public class RelationTypeManager { public static List<RelationType> getValidTypes(IArtifactType artifactType, IOseeBranch branch) throws OseeCoreException { Collection<RelationType> relationTypes = getAllTypes(); - List<RelationType> validRelationTypes = new ArrayList<RelationType>(); + List<RelationType> validRelationTypes = new ArrayList<>(); for (RelationType relationType : relationTypes) { int sideAMax = getRelationSideMax(relationType, artifactType, RelationSide.SIDE_A); int sideBMax = getRelationSideMax(relationType, artifactType, RelationSide.SIDE_B); 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 43c90fcf357..bad7a1c36d2 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 @@ -43,7 +43,7 @@ public class RelationOrderData { private final IArtifact artifact; public RelationOrderData(IRelationOrderAccessor accessor, IArtifact artifact) { - this.lists = new CompositeKeyHashMap<String, String, Pair<String, List<String>>>(); + this.lists = new CompositeKeyHashMap<>(); this.accessor = accessor; this.artifact = artifact; } @@ -174,8 +174,8 @@ public class RelationOrderData { result = o1.getValue().getFirst().compareTo(o2.getValue().getFirst()); } if (result == 0) { - List<String> guids1 = new ArrayList<String>(o1.getValue().getSecond()); - List<String> guids2 = new ArrayList<String>(o2.getValue().getSecond()); + List<String> guids1 = new ArrayList<>(o1.getValue().getSecond()); + List<String> guids2 = new ArrayList<>(o2.getValue().getSecond()); result = guids1.size() - guids2.size(); if (result == 0) { Collections.sort(guids1); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtility.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtility.java index 9d15c8eccc9..11eaf7d70ea 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtility.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMergeUtility.java @@ -58,7 +58,7 @@ public class RelationOrderMergeUtility { } private static Collection<Pair<String, String>> getAllTypeSides(RelationOrderData leftData, RelationOrderData rightData) { - Collection<Pair<String, String>> rts = new HashSet<Pair<String, String>>(); + Collection<Pair<String, String>> rts = new HashSet<>(); rts.addAll(leftData.getAvailableTypeSides()); rts.addAll(rightData.getAvailableTypeSides()); @@ -66,7 +66,7 @@ public class RelationOrderMergeUtility { } private static List<String> mergeTypeSideOrder(Artifact left, Artifact right, IRelationTypeSide rts) throws OseeCoreException { - RelationOrderMerger<String> merger = new RelationOrderMerger<String>(); + RelationOrderMerger<String> merger = new RelationOrderMerger<>(); List<String> leftRelatives = getGuidList(left.getRelatedArtifacts(rts, DeletionFlag.EXCLUDE_DELETED)); List<String> rightRelatives = getGuidList(right.getRelatedArtifacts(rts, DeletionFlag.EXCLUDE_DELETED)); Collection<String> mergedSet = getMergedSet(left, right, rts); @@ -75,8 +75,8 @@ public class RelationOrderMergeUtility { } private static Collection<String> getMergedSet(Artifact left, Artifact right, IRelationTypeSide relationTypeSide) throws OseeCoreException { - Collection<String> mergedSet = new HashSet<String>(); - Collection<String> deleted = new HashSet<String>(); + Collection<String> mergedSet = new HashSet<>(); + Collection<String> deleted = new HashSet<>(); List<String> leftRelatives = getGuidList(left.getRelatedArtifacts(relationTypeSide, DeletionFlag.EXCLUDE_DELETED)); List<String> rightRelatives = @@ -92,7 +92,7 @@ public class RelationOrderMergeUtility { } private static List<String> getGuidList(List<Artifact> artifacts) { - List<String> toReturn = new ArrayList<String>(); + List<String> toReturn = new ArrayList<>(); for (Artifact art : artifacts) { toReturn.add(art.getGuid()); } @@ -100,7 +100,7 @@ public class RelationOrderMergeUtility { } private static Collection<String> getDeleted(Artifact art, IRelationTypeSide relationType) throws OseeCoreException { - Collection<String> toReturn = new HashSet<String>(); + Collection<String> toReturn = new HashSet<>(); for (RelationLink link : art.getRelationsAll(DeletionFlag.INCLUDE_DELETED)) { if (link.isOfType(relationType) && link.isDeleted()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMerger.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMerger.java index 2adafdba790..3099f39d276 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMerger.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderMerger.java @@ -18,7 +18,7 @@ public class RelationOrderMerger<T> { private final List<T> starredList; public RelationOrderMerger() { - starredList = new ArrayList<T>(); + starredList = new ArrayList<>(); } public List<T> computeMergedOrder(List<T> leftOrder, List<T> rightOrder, Collection<T> mergedSet) { @@ -55,7 +55,7 @@ public class RelationOrderMerger<T> { } private List<T> cursorAlgorithm(List<T> left, List<T> right, Collection<T> mergedSet) { - List<T> mergedOrder = new ArrayList<T>(); + List<T> mergedOrder = new ArrayList<>(); int leftIndex = 0; int rightIndex = 0; while (leftIndex < left.size() && rightIndex < right.size()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParser.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParser.java index c47b4dd8125..8084d3b8a02 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParser.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationOrderParser.java @@ -143,7 +143,7 @@ public class RelationOrderParser { List<String> guidsList = Collections.emptyList(); if (list != null) { String[] guids = list.split(","); - guidsList = new ArrayList<String>(); + guidsList = new ArrayList<>(); Collections.addAll(guidsList, guids); } data.addOrderList(relationType, relationSide, orderType, guidsList); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationSorterProvider.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationSorterProvider.java index 395da6cf073..c4785458605 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationSorterProvider.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/order/RelationSorterProvider.java @@ -34,7 +34,7 @@ public class RelationSorterProvider { private final Map<String, IRelationSorter> orderMap; public RelationSorterProvider() { - orderMap = new ConcurrentHashMap<String, IRelationSorter>(); + orderMap = new ConcurrentHashMap<>(); registerOrderType(new LexicographicalRelationSorter(SortMode.ASCENDING)); registerOrderType(new LexicographicalRelationSorter(SortMode.DESCENDING)); @@ -66,7 +66,7 @@ public class RelationSorterProvider { public List<IRelationSorterId> getAllRelationOrderIds() { Collection<IRelationSorter> relationOrder = orderMap.values(); - List<IRelationSorterId> ids = new ArrayList<IRelationSorterId>(); + List<IRelationSorterId> ids = new ArrayList<>(); for (IRelationSorter order : relationOrder) { ids.add(order.getSorterId()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/sorters/UserDefinedOrderComparator.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/sorters/UserDefinedOrderComparator.java index 4b1295a6a8c..eafd5557595 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/sorters/UserDefinedOrderComparator.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/relation/sorters/UserDefinedOrderComparator.java @@ -24,7 +24,7 @@ class UserDefinedOrderComparator implements Comparator<IArtifact> { private final Map<String, Integer> value; UserDefinedOrderComparator(List<String> guidOrder) { - value = new HashMap<String, Integer>(guidOrder.size()); + value = new HashMap<>(guidOrder.size()); for (int i = 0; i < guidOrder.size(); i++) { value.put(guidOrder.get(i), i); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java index 1feb466b9f9..c07e9cec272 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeData.java @@ -59,7 +59,7 @@ public class ChangeData { } public Collection<Change> getArtifactChangesByName(String name) throws OseeCoreException { - Collection<Change> foundChanges = new HashSet<Change>(); + Collection<Change> foundChanges = new HashSet<>(); try { for (Change change : changes) { if (change instanceof ArtifactChange) { @@ -93,10 +93,10 @@ public class ChangeData { Collection<ModificationType> modTypes = Collections.getAggregate(modificationType); Conditions.checkExpressionFailOnTrue(modTypes.isEmpty(), "ModificationType must be specified"); - Set<Artifact> artifacts = new HashSet<Artifact>(); + Set<Artifact> artifacts = new HashSet<>(); if (kindType == KindType.Artifact || kindType == KindType.ArtifactOrRelation || kindType == KindType.Relation) { if (!isEmpty()) { - HashMap<Integer, Boolean> excludeArtifact = new HashMap<Integer, Boolean>(); + HashMap<Integer, Boolean> excludeArtifact = new HashMap<>(); for (Change change : changes) { Artifact artifact = change.getChangeArtifact(); @@ -150,7 +150,7 @@ public class ChangeData { } } if ((artifactTypesToIgnore != null) && (!artifactTypesToIgnore.isEmpty())) { - Set<Artifact> excludeList = new HashSet<Artifact>(); + Set<Artifact> excludeList = new HashSet<>(); for (Artifact artifactToCheck : artifacts) { Integer id = artifactToCheck.getArtId(); Boolean remove = excludeArtifact.get(id); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java index 1d633349872..9835ebde277 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/ChangeDataLoader.java @@ -275,7 +275,7 @@ public class ChangeDataLoader extends AbstractOperation { } private static Set<Integer> asArtIds(Collection<ChangeItem> changeItems) { - Set<Integer> artIds = new HashSet<Integer>(); + Set<Integer> artIds = new HashSet<>(); for (ChangeItem item : changeItems) { artIds.add(item.getArtId()); if (item.getChangeType().isRelationChange()) { 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 baa357b13d2..673f4c4341c 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 @@ -50,7 +50,7 @@ public final class ChangeManager { } public static Collection<ArtifactDelta> getCompareArtifacts(Collection<Change> changes) { - Collection<ArtifactDelta> toReturn = new ArrayList<ArtifactDelta>(changes.size()); + Collection<ArtifactDelta> toReturn = new ArrayList<>(changes.size()); for (Change change : changes) { toReturn.add(change.getDelta()); } @@ -102,7 +102,7 @@ public final class ChangeManager { */ public static HashCollection<Artifact, TransactionRecord> getModifingTransactions(Collection<Artifact> artifacts) throws OseeCoreException { ArtifactJoinQuery joinQuery = JoinUtility.createArtifactJoinQuery(); - CompositeKeyHashMap<Integer, Branch, Artifact> artifactMap = new CompositeKeyHashMap<Integer, Branch, Artifact>(); + CompositeKeyHashMap<Integer, Branch, Artifact> artifactMap = new CompositeKeyHashMap<>(); for (Artifact artifact : artifacts) { Branch branch = artifact.getFullBranch(); artifactMap.put(artifact.getArtId(), branch, artifact); @@ -117,7 +117,7 @@ public final class ChangeManager { } } - HashCollection<Artifact, TransactionRecord> transactionMap = new HashCollection<Artifact, TransactionRecord>(); + HashCollection<Artifact, TransactionRecord> transactionMap = new HashCollection<>(); try { joinQuery.store(); JdbcStatement chStmt = ConnectionHandler.getStatement(); @@ -160,7 +160,7 @@ public final class ChangeManager { } } - HashCollection<Artifact, Branch> branchMap = new HashCollection<Artifact, Branch>(); + HashCollection<Artifact, Branch> branchMap = new HashCollection<>(); try { joinQuery.store(); JdbcStatement chStmt = ConnectionHandler.getStatement(); 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 06c6563b583..2c94ac42baa 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 @@ -89,7 +89,7 @@ public class ConflictManagerInternal { public static List<Conflict> getConflictsPerBranch(TransactionRecord commitTransaction, IProgressMonitor monitor) throws OseeCoreException { monitor.beginTask(String.format("Loading Merge Manager for Transaction %d", commitTransaction.getId()), 100); monitor.subTask("Finding Database stored conflicts"); - ArrayList<Conflict> conflicts = new ArrayList<Conflict>(); + ArrayList<Conflict> conflicts = new ArrayList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(ServiceUtil.getSql(OseeSql.CONFLICT_GET_HISTORICAL_ATTRIBUTES), @@ -118,11 +118,11 @@ public class ConflictManagerInternal { @SuppressWarnings("unused") // This is for bulk loading so we do not lose our references Collection<Artifact> bulkLoadedArtifacts; - List<ConflictBuilder> conflictBuilders = new ArrayList<ConflictBuilder>(); - List<Conflict> conflicts = new ArrayList<Conflict>(); - Set<Integer> artIdSet = new HashSet<Integer>(); - Set<Integer> artIdSetDontShow = new HashSet<Integer>(); - Set<Integer> artIdSetDontAdd = new HashSet<Integer>(); + List<ConflictBuilder> conflictBuilders = new ArrayList<>(); + List<Conflict> conflicts = new ArrayList<>(); + Set<Integer> artIdSet = new HashSet<>(); + Set<Integer> artIdSetDontShow = new HashSet<>(); + Set<Integer> artIdSetDontAdd = new HashSet<>(); // Check to see if the branch has already been committed, then use the // transaction version @@ -208,7 +208,7 @@ public class ConflictManagerInternal { private static void loadMultiplicityConflicts(Collection<IAttributeType> types, Branch source, Branch dest, TransactionRecord baselineTransaction, List<ConflictBuilder> conflictBuilders, Set<Integer> artIdSet) { IdJoinQuery joinQuery = JoinUtility.createIdJoinQuery(); JdbcStatement chStmt = ConnectionHandler.getStatement(); - List<Object[]> batchParams = new LinkedList<Object[]>(); + List<Object[]> batchParams = new LinkedList<>(); try { for (IAttributeType type : types) { joinQuery.add(type.getGuid()); @@ -391,7 +391,7 @@ public class ConflictManagerInternal { } public static Collection<Long> getDestinationBranchesMerged(long sourceBranchId) throws OseeCoreException { - List<Long> destinationBranches = new LinkedList<Long>(); + List<Long> destinationBranches = new LinkedList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(GET_DESTINATION_BRANCHES, sourceBranchId); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java index 14665f3f5fe..dc0463fbc43 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/RevisionChangeLoader.java @@ -70,12 +70,12 @@ public final class RevisionChangeLoader { */ private Collection<Change> getChangesPerArtifact(Artifact artifact, IProgressMonitor monitor, LoadChangeType... loadChangeTypes) throws OseeCoreException { Branch branch = artifact.getFullBranch(); - Set<TransactionRecord> transactionIds = new LinkedHashSet<TransactionRecord>(); + Set<TransactionRecord> transactionIds = new LinkedHashSet<>(); boolean recurseThroughBranchHierarchy = true; loadBranchTransactions(branch, artifact, transactionIds, TransactionManager.getHeadTransaction(branch), recurseThroughBranchHierarchy); - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); for (TransactionRecord transactionId : transactionIds) { loadChanges(null, transactionId, monitor, artifact, changes, loadChangeTypes); @@ -125,11 +125,11 @@ public final class RevisionChangeLoader { } monitor.beginTask("Find Changes", 100); - Set<Integer> artIds = new HashSet<Integer>(); - Set<Integer> newAndDeletedArtifactIds = new HashSet<Integer>(); + Set<Integer> artIds = new HashSet<>(); + Set<Integer> newAndDeletedArtifactIds = new HashSet<>(); boolean isHistorical = sourceBranch == null; - ArrayList<ChangeBuilder> changeBuilders = new ArrayList<ChangeBuilder>(); + ArrayList<ChangeBuilder> changeBuilders = new ArrayList<>(); for (LoadChangeType changeType : loadChangeTypes) { switch (changeType) { case artifact: @@ -200,7 +200,7 @@ public final class RevisionChangeLoader { CompositeKeyHashMap<TransactionRecord, Integer, Artifact> loadedMap = getBulkLoadedArtifacts(branch, isHistorical, changeBuilders); - Collection<Change> changes = new ArrayList<Change>(); + Collection<Change> changes = new ArrayList<>(); for (ChangeBuilder builder : changeBuilders) { Change toReturn = null; Artifact changeArtifact = loadedMap.get(builder.getTxDelta().getEndTx(), builder.getArtId()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java index 06b01f93feb..a9783fb5e43 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/ArtifactChangeAcquirer.java @@ -41,7 +41,7 @@ public class ArtifactChangeAcquirer extends ChangeAcquirer { @Override public ArrayList<ChangeBuilder> acquireChanges() throws OseeCoreException { - Map<Integer, ArtifactChangeBuilder> artifactChangeBuilders = new HashMap<Integer, ArtifactChangeBuilder>(); + Map<Integer, ArtifactChangeBuilder> artifactChangeBuilders = new HashMap<>(); boolean hasBranch = getSourceBranch() != null; TransactionRecord fromTransactionId; TransactionRecord toTransactionId; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java index ed88ad59fd4..15233e076ae 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/revision/acquirer/AttributeChangeAcquirer.java @@ -50,9 +50,9 @@ public class AttributeChangeAcquirer extends ChangeAcquirer { @Override public ArrayList<ChangeBuilder> acquireChanges() throws OseeCoreException { - Map<Integer, ChangeBuilder> attributesWasValueCache = new HashMap<Integer, ChangeBuilder>(); - Map<Integer, ModificationType> artModTypes = new HashMap<Integer, ModificationType>(); - Set<Integer> modifiedArtifacts = new HashSet<Integer>(); + Map<Integer, ChangeBuilder> attributesWasValueCache = new HashMap<>(); + Map<Integer, ModificationType> artModTypes = new HashMap<>(); + Set<Integer> modifiedArtifacts = new HashSet<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); boolean hasBranch = getSourceBranch() != null; long time = System.currentTimeMillis(); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java index 86ff7755294..671bf5ac2be 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/SkynetTransaction.java @@ -71,8 +71,8 @@ public final class SkynetTransaction extends TransactionOperation<Branch> { new CompositeKeyHashMap<Class<? extends BaseTransactionData>, Integer, BaseTransactionData>(); // Used to avoid garbage collection of artifacts until the transaction has been committed and determine attribute events; - private final Set<Artifact> modifiedArtifacts = new HashSet<Artifact>(); - private final Set<Artifact> alreadyProcessedArtifacts = new HashSet<Artifact>(); + private final Set<Artifact> modifiedArtifacts = new HashSet<>(); + private final Set<Artifact> alreadyProcessedArtifacts = new HashSet<>(); private String comment; private User user; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java index 0c6e78f7863..5aec56ac35f 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/transaction/StoreSkynetTransactionOperation.java @@ -54,8 +54,8 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation private static final String UPDATE_TXS_NOT_CURRENT = "UPDATE osee_txs SET tx_current = " + TxChange.NOT_CURRENT.getValue() + " WHERE branch_id = ? AND transaction_id = ? AND gamma_id = ?"; - private final HashCollection<String, Object[]> dataItemInserts = new HashCollection<String, Object[]>(); - private final Map<Integer, String> dataInsertOrder = new HashMap<Integer, String>(); + private final HashCollection<String, Object[]> dataItemInserts = new HashCollection<>(); + private final Map<Integer, String> dataInsertOrder = new HashMap<>(); private final Branch branch; private final TransactionRecord transactionRecord; @@ -122,7 +122,7 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation } private void tagGammas() throws OseeCoreException { - Set<Long> gammasToTag = new LinkedHashSet<Long>(); + Set<Long> gammasToTag = new LinkedHashSet<>(); for (BaseTransactionData transactionData : txDatas) { if (!transactionData.getModificationType().isExistingVersionUsed() && transactionData instanceof AttributeTransactionData) { AttributeTransactionData attrData = (AttributeTransactionData) transactionData; @@ -141,7 +141,7 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation } private void executeTransactionDataItems(JdbcConnection connection) throws OseeCoreException { - List<Object[]> txNotCurrentData = new ArrayList<Object[]>(); + List<Object[]> txNotCurrentData = new ArrayList<>(); for (BaseTransactionData transactionData : txDatas) { // Collect inserts for attribute, relation, artifact, and artifact version tables transactionData.addInsertToBatch(this); @@ -152,7 +152,7 @@ public final class StoreSkynetTransactionOperation extends AbstractDbTxOperation } // Insert into data tables - i.e. attribute, relation and artifact version tables - List<Integer> keys = new ArrayList<Integer>(dataInsertOrder.keySet()); + List<Integer> keys = new ArrayList<>(dataInsertOrder.keySet()); Collections.sort(keys); for (int priority : keys) { String sqlKey = dataInsertOrder.get(priority); 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 a5d41da9ddd..3ec397c6cd7 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 @@ -72,7 +72,7 @@ public final class TransactionManager { private static final HashMap<Integer, List<TransactionRecord>> commitArtifactIdMap = new HashMap<Integer, List<TransactionRecord>>(); - private static final TxMonitorImpl<Branch> txMonitor = new TxMonitorImpl<Branch>(new TxMonitorCache<Branch>()); + private static final TxMonitorImpl<Branch> txMonitor = new TxMonitorImpl<>(new TxMonitorCache<>()); public static SkynetTransaction createTransaction(IOseeBranch branch, String comment) throws OseeCoreException { Branch actualBranch = BranchManager.getBranch(branch); @@ -82,7 +82,7 @@ public final class TransactionManager { } public static List<TransactionRecord> getTransaction(String comment) throws OseeCoreException { - ArrayList<TransactionRecord> transactions = new ArrayList<TransactionRecord>(); + ArrayList<TransactionRecord> transactions = new ArrayList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(SELECT_TRANSACTION_COMMENTS, comment); @@ -112,7 +112,7 @@ public final class TransactionManager { } public static List<TransactionRecord> getTransactionsForBranch(Branch branch) throws OseeCoreException { - ArrayList<TransactionRecord> transactions = new ArrayList<TransactionRecord>(); + ArrayList<TransactionRecord> transactions = new ArrayList<>(); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { @@ -132,7 +132,7 @@ public final class TransactionManager { // Cache the transactionIds first time through. Other commits will be added to cache as they // happen in this client or as remote commit events come through if (transactionIds == null) { - transactionIds = new ArrayList<TransactionRecord>(5); + transactionIds = new ArrayList<>(5); JdbcStatement chStmt = ConnectionHandler.getStatement(); try { chStmt.runPreparedQuery(SELECT_COMMIT_TRANSACTIONS, artifact.getArtId()); @@ -172,9 +172,8 @@ public final class TransactionManager { */ public static TransactionRecord getHeadTransaction(IOseeBranch branch) throws OseeCoreException { long branchUuid = branch.getUuid(); - int transactionNumber = - ConnectionHandler.runPreparedQueryFetchInt(-1, ServiceUtil.getSql(OseeSql.TX_GET_MAX_AS_LARGEST_TX), - branchUuid); + int transactionNumber = ConnectionHandler.runPreparedQueryFetchInt(-1, + ServiceUtil.getSql(OseeSql.TX_GET_MAX_AS_LARGEST_TX), branchUuid); if (transactionNumber == -1) { throw new TransactionDoesNotExist("No transactions where found in the database for branch: %d", branchUuid); } @@ -199,9 +198,8 @@ public final class TransactionManager { int authorArtId = userToBlame.getArtId(); TransactionDetailsType txType = TransactionDetailsType.NonBaselined; Date transactionTime = GlobalTime.GreenwichMeanTimestamp(); - TransactionRecord transactionId = - factory.createOrUpdate(getTransactionCache(), transactionNumber, branch.getUuid(), comment, transactionTime, - authorArtId, 0, txType, getBranchCache()); + TransactionRecord transactionId = factory.createOrUpdate(getTransactionCache(), transactionNumber, + branch.getUuid(), comment, transactionTime, authorArtId, 0, txType, getBranchCache()); return transactionId; } @@ -270,10 +268,9 @@ public final class TransactionManager { TransactionDetailsType txType = TransactionDetailsType.toEnum(chStmt.getInt("tx_type")); BranchCache branchCache = getBranchCache(); - transactionRecord = - factory.createOrUpdate(txCache, txId, chStmt.getLong("branch_id"), chStmt.getString("osee_comment"), - chStmt.getTimestamp("time"), chStmt.getInt("author"), chStmt.getInt("commit_art_id"), txType, - branchCache); + transactionRecord = factory.createOrUpdate(txCache, txId, chStmt.getLong("branch_id"), + chStmt.getString("osee_comment"), chStmt.getTimestamp("time"), chStmt.getInt("author"), + chStmt.getInt("commit_art_id"), txType, branchCache); } finally { if (useLocalConnection) { 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 a8fad426f8b..281cbfe3fef 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 @@ -39,7 +39,7 @@ public final class TxMonitorCache<K> { public void putTx(K key, MonitoredTx tx) { Map<String, WeakReference<MonitoredTx>> data = txMap.get(key); if (data == null) { - data = new ConcurrentHashMap<String, WeakReference<MonitoredTx>>(); + data = new ConcurrentHashMap<>(); txMap.put(key, data); } data.put(tx.getUuid(), new WeakReference<MonitoredTx>(tx)); @@ -55,7 +55,7 @@ public final class TxMonitorCache<K> { } private void manageReferences() { - Set<K> toRemove = new HashSet<K>(); + Set<K> toRemove = new HashSet<>(); for (Entry<K, Map<String, WeakReference<MonitoredTx>>> entry : txMap.entrySet()) { Map<?, WeakReference<MonitoredTx>> data = entry.getValue(); manageReferences(data); @@ -69,7 +69,7 @@ public final class TxMonitorCache<K> { } private void manageReferences(Map<?, WeakReference<MonitoredTx>> data) { - Set<Object> toRemove = new HashSet<Object>(); + Set<Object> toRemove = new HashSet<>(); for (Entry<?, WeakReference<MonitoredTx>> entry : data.entrySet()) { WeakReference<?> reference = entry.getValue(); if (reference == null || reference.get() == null) { @@ -100,10 +100,10 @@ public final class TxMonitorCache<K> { } public List<MonitoredTx> getTxs(K key) { - List<MonitoredTx> txs = new ArrayList<MonitoredTx>(); + List<MonitoredTx> txs = new ArrayList<>(); Map<String, WeakReference<MonitoredTx>> data = txMap.get(key); if (data != null) { - Set<String> toRemove = new HashSet<String>(); + Set<String> toRemove = new HashSet<>(); for (Entry<String, WeakReference<MonitoredTx>> entry : data.entrySet()) { WeakReference<MonitoredTx> reference = entry.getValue(); if (reference != null) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AbstractJoinQuery.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AbstractJoinQuery.java index b1aad2a5930..3bb3ea630d5 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AbstractJoinQuery.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/AbstractJoinQuery.java @@ -36,7 +36,7 @@ public abstract class AbstractJoinQuery { private final Long expiresIn; private final int queryId; - protected final Set<IJoinRow> entries = new HashSet<IJoinRow>(); + protected final Set<IJoinRow> entries = new HashSet<>(); private boolean wasStored; private int storedSize; @@ -72,7 +72,7 @@ public abstract class AbstractJoinQuery { public void store(JdbcConnection connection) throws OseeCoreException { if (!this.wasStored) { - List<Object[]> data = new ArrayList<Object[]>(); + List<Object[]> data = new ArrayList<>(); for (IJoinRow joinArray : entries) { data.add(joinArray.toArray()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java index 8c58cf4ade3..36af7d6d9c5 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java @@ -48,7 +48,7 @@ public final class Artifacts { } public static Collection<Integer> toIds(Collection<? extends IArtifact> artifacts) { - Set<Integer> toReturn = new HashSet<Integer>(artifacts.size()); + Set<Integer> toReturn = new HashSet<>(artifacts.size()); for (IArtifact artifact : artifacts) { toReturn.add(artifact.getArtId()); } @@ -56,7 +56,7 @@ public final class Artifacts { } public static List<String> toGuids(Collection<? extends IArtifact> artifacts) { - List<String> guids = new ArrayList<String>(artifacts.size()); + List<String> guids = new ArrayList<>(artifacts.size()); for (IArtifact artifact : artifacts) { guids.add(artifact.getGuid()); } @@ -104,7 +104,7 @@ public final class Artifacts { } public static Collection<String> getNames(Collection<? extends Named> artifacts) { - ArrayList<String> names = new ArrayList<String>(); + ArrayList<String> names = new ArrayList<>(); for (Named namedArtifact : artifacts) { names.add(namedArtifact.getName()); } @@ -143,7 +143,7 @@ public final class Artifacts { */ @SuppressWarnings("unchecked") public static <A extends Artifact> Set<A> getChildrenAndThisOfTypeSet(Artifact parentArtifact, Class<A> clazz, boolean recurse) throws OseeCoreException { - Set<A> thisAndChildren = new HashSet<A>(); + Set<A> thisAndChildren = new HashSet<>(); if (parentArtifact.getClass().equals(clazz)) { thisAndChildren.add((A) parentArtifact); } @@ -153,7 +153,7 @@ public final class Artifacts { @SuppressWarnings("unchecked") public static <A extends Artifact> Set<A> getChildrenOfTypeSet(Artifact parentArtifact, Class<A> clazz, boolean recurse) throws OseeCoreException { - Set<A> children = new HashSet<A>(); + Set<A> children = new HashSet<>(); for (Artifact child : parentArtifact.getChildren()) { if (child.getClass().equals(clazz)) { children.add((A) child); @@ -166,7 +166,7 @@ public final class Artifacts { } public static Map<String, String> getDetailsKeyValues(Artifact artifact) throws OseeCoreException { - Map<String, String> details = new HashMap<String, String>(); + Map<String, String> details = new HashMap<>(); if (artifact != null) { details.put("UUID", String.valueOf(artifact.getArtId())); details.put("GUID", String.valueOf(Xml.escape(artifact.getGuid()))); @@ -220,7 +220,7 @@ public final class Artifacts { } public static HashCollection<IOseeBranch, Artifact> getBranchArtifactMap(Collection<Artifact> artifacts) { - HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<IOseeBranch, Artifact>(); + HashCollection<IOseeBranch, Artifact> branchMap = new HashCollection<>(); for (Artifact artifact : artifacts) { branchMap.put(artifact.getBranch(), artifact); } @@ -228,7 +228,7 @@ public final class Artifacts { } public static Collection<Artifact> getOfType(IArtifactType artifactType, Collection<? extends Artifact> artifacts) { - List<Artifact> results = new ArrayList<Artifact>(); + List<Artifact> results = new ArrayList<>(); for (Artifact art : artifacts) { if (art.isOfType(artifactType)) { results.add(art); @@ -260,7 +260,7 @@ public final class Artifacts { } public static Collection<Long> toUuids(Set<Artifact> artifacts) { - List<Long> uuids = new ArrayList<Long>(artifacts.size()); + List<Long> uuids = new ArrayList<>(artifacts.size()); for (IArtifact artifact : artifacts) { uuids.add(artifact.getUuid()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java index 205dacef9e6..168d9d4960a 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/CsvArtifact.java @@ -84,7 +84,7 @@ public class CsvArtifact { } public List<List<String>> getRows(boolean ignoreHeaderRow) throws OseeCoreException { - List<List<String>> rows = new ArrayList<List<String>>(); + List<List<String>> rows = new ArrayList<>(); String csvData = getCsvData(); String[] csvLines = csvData.split("\n"); @@ -92,7 +92,7 @@ public class CsvArtifact { for (String csvLine : csvLines) { if ((ignoreHeaderRow && rowIndex > 0) || !ignoreHeaderRow) { String[] values = csvLine.split(","); - List<String> row = new ArrayList<String>(); + List<String> row = new ArrayList<>(); for (String value : values) { value = value.trim(); row.add(value); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/DatabaseJoinAccessor.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/DatabaseJoinAccessor.java index 1e8785e2301..c54f9cc0000 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/DatabaseJoinAccessor.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/DatabaseJoinAccessor.java @@ -98,7 +98,7 @@ public class DatabaseJoinAccessor implements IJoinAccessor { @Override public Collection<Integer> getAllQueryIds(JdbcConnection connection, JoinItem joinItem) throws OseeCoreException { - Collection<Integer> queryIds = new ArrayList<Integer>(); + Collection<Integer> queryIds = new ArrayList<>(); JdbcStatement chStmt = jdbcClient.getStatement(connection); try { String query = String.format(SELECT_QUERY_IDS, joinItem.getJoinTableName()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/EmailUtil.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/EmailUtil.java index 4129c59ce4a..8a3f2e7a391 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/EmailUtil.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/EmailUtil.java @@ -36,7 +36,7 @@ public class EmailUtil { } public static Collection<User> getValidEmailUsers(Collection<User> users) { - Set<User> validUsers = new HashSet<User>(); + Set<User> validUsers = new HashSet<>(); for (User user : users) { try { if (isEmailValid(user)) { @@ -50,7 +50,7 @@ public class EmailUtil { } public static Collection<User> getActiveEmailUsers(Collection<? extends User> users) { - Set<User> activeUsers = new HashSet<User>(); + Set<User> activeUsers = new HashSet<>(); for (User user : users) { try { if (user.isActive()) { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java index decc62a1a2c..b70e753ebc1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/ExcelXmlArtifact.java @@ -36,7 +36,7 @@ public class ExcelXmlArtifact implements RowProcessor { private final String staticId; private final IOseeBranch branch; private final ExcelSaxHandler excelHandler; - private final List<Worksheet> workbook = new ArrayList<Worksheet>(); + private final List<Worksheet> workbook = new ArrayList<>(); private Worksheet currentWorksheet = null; private boolean initialized = false; @@ -116,7 +116,7 @@ public class ExcelXmlArtifact implements RowProcessor { } public static class Row { - private final List<String> row = new ArrayList<String>(); + private final List<String> row = new ArrayList<>(); public Row() { // @@ -146,7 +146,7 @@ public class ExcelXmlArtifact implements RowProcessor { } public static class Worksheet { - private final List<Row> rows = new ArrayList<Row>(); + private final List<Row> rows = new ArrayList<>(); private Row headerRow = null; private final String name; private int rowCount = 0; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java index 09d47221ae8..d9d1abde8ee 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/InvalidTxCurrentsAndModTypes.java @@ -37,10 +37,10 @@ public class InvalidTxCurrentsAndModTypes extends AbstractOperation { private static final String UPDATE_ADDRESS = "update osee_txs%s set tx_current = ? where transaction_id = ? and gamma_id = ? and branch_id = ?"; - private final List<Address> addresses = new ArrayList<Address>(); + private final List<Address> addresses = new ArrayList<>(); - private final List<Object[]> purgeData = new ArrayList<Object[]>(); - private final List<Object[]> currentData = new ArrayList<Object[]>(); + private final List<Object[]> purgeData = new ArrayList<>(); + private final List<Object[]> currentData = new ArrayList<>(); private final String tableName; private final String columnName; private final boolean isFixOperationEnabled; diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/NormalizeHtml.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/NormalizeHtml.java index 41abf784771..b4766c619c0 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/NormalizeHtml.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/NormalizeHtml.java @@ -84,7 +84,7 @@ public final class NormalizeHtml { } private static TreeMap<Integer, String> initializeFontMap() { - TreeMap<Integer, String> map = new TreeMap<Integer, String>(); + TreeMap<Integer, String> map = new TreeMap<>(); map.put(new Integer(8), "xx-small;"); map.put(new Integer(11), "small;"); map.put(new Integer(13), "medium;"); @@ -174,7 +174,7 @@ public final class NormalizeHtml { String[] tagsToCheck = {"li", "tr", "td", "table"}; for (String select : tagsToCheck) { Elements theNode = doc.select(select); - ArrayList<Node> remove = new ArrayList<Node>(); + ArrayList<Node> remove = new ArrayList<>(); for (Element item : theNode) { List<Node> kids = item.childNodes(); for (Node n : kids) { @@ -242,7 +242,7 @@ public final class NormalizeHtml { */ if (allowedAttributes == null) { - allowedAttributes = new ArrayList<String>(); + allowedAttributes = new ArrayList<>(); allowedAttributes.add("border"); allowedAttributes.add("frame"); allowedAttributes.add("rules"); 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 8b97ba63124..c58bf5d0a75 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 @@ -29,7 +29,7 @@ public class OseeInfo { public static final String DB_ID_KEY = "osee.db.guid"; public static final String DB_TYPE_KEY = "osee.db.type"; - private static Map<String, Pair<Long, String>> cache = new ConcurrentHashMap<String, Pair<Long, String>>(); + private static Map<String, Pair<Long, String>> cache = new ConcurrentHashMap<>(); public static String getValue(String key) throws OseeCoreException { return getValue(key, (long) Integer.MAX_VALUE); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperation.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperation.java index 5a940bcb5e7..3ff1d70fca1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperation.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperation.java @@ -39,8 +39,8 @@ public class PurgeTransactionOperation extends AbstractOperation { void onPurgeTransactionSuccess(Collection<TransactionRecord> transactions); } - private final Set<PurgeTransactionListener> listeners = new CopyOnWriteArraySet<PurgeTransactionListener>(); - private final Collection<TransactionRecord> changedTransactions = new ArrayList<TransactionRecord>(); + private final Set<PurgeTransactionListener> listeners = new CopyOnWriteArraySet<>(); + private final Collection<TransactionRecord> changedTransactions = new ArrayList<>(); public PurgeTransactionOperation(List<Integer> txIdsToDelete) { super("Purge transactions " + txIdsToDelete, Activator.PLUGIN_ID, NullOperationLogger.getSingleton()); diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperationWithListener.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperationWithListener.java index f5ffac0a5db..05936d3dcd1 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperationWithListener.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeTransactionOperationWithListener.java @@ -28,7 +28,7 @@ import org.eclipse.osee.framework.skynet.core.utility.PurgeTransactionOperation. public class PurgeTransactionOperationWithListener { public static IOperation getPurgeTransactionOperation(List<TransactionRecord> transactions) throws OseeCoreException { - List<Integer> txIdsToDelete = new ArrayList<Integer>(); + List<Integer> txIdsToDelete = new ArrayList<>(); for (TransactionRecord record : transactions) { txIdsToDelete.add(record.getId()); } diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeUnusedBackingDataAndTransactions.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeUnusedBackingDataAndTransactions.java index d1f33eb4de8..a1804301b83 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeUnusedBackingDataAndTransactions.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/PurgeUnusedBackingDataAndTransactions.java @@ -52,7 +52,7 @@ public class PurgeUnusedBackingDataAndTransactions extends AbstractDbTxOperation } private void processNotAddressedGammas(JdbcConnection connection, String tableName) throws OseeCoreException { - List<Object[]> notAddressedGammas = new LinkedList<Object[]>(); + List<Object[]> notAddressedGammas = new LinkedList<>(); JdbcStatement chStmt = getJdbcClient().getStatement(connection); try { @@ -72,7 +72,7 @@ public class PurgeUnusedBackingDataAndTransactions extends AbstractDbTxOperation } private void processAddressedButNonexistentGammas(JdbcConnection connection, String tableName) throws OseeCoreException { - List<Object[]> nonexistentGammas = new LinkedList<Object[]>(); + List<Object[]> nonexistentGammas = new LinkedList<>(); JdbcStatement chStmt = getJdbcClient().getStatement(connection); try { @@ -93,7 +93,7 @@ public class PurgeUnusedBackingDataAndTransactions extends AbstractDbTxOperation } private void processEmptyTransactions(JdbcConnection connection) throws OseeCoreException { - List<Object[]> emptyTransactions = new LinkedList<Object[]>(); + List<Object[]> emptyTransactions = new LinkedList<>(); JdbcStatement chStmt = getJdbcClient().getStatement(connection); try { diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/UsersByIds.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/UsersByIds.java index 1533165a84f..399220b3078 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/UsersByIds.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/UsersByIds.java @@ -39,7 +39,7 @@ public class UsersByIds { } public static List<User> getUsers(String sorageString) { - List<User> users = new ArrayList<User>(); + List<User> users = new ArrayList<>(); Matcher m = userPattern.matcher(sorageString); while (m.find()) { String userId = m.group(1); 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 022db790e4f..16fc9f935ca 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 @@ -137,7 +137,7 @@ public class OseeValidator { // TODO Implement dynamic attribute type validation chain definition // public List<IValidator> createValidateChain(String xml) { - // List<IValidator> validators = new ArrayList<IValidator>(); + // List<IValidator> validators = new ArrayList<>(); // return validators; // } } 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 d77552fabb1..dae811fd29a 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 @@ -102,7 +102,7 @@ public class UpdateBookmarkIds { Collection<Node> nodes = Jaxp.selectNodesViaXPath(xPath, element, XPATH_EXPRESSION); //Get a new value for each aml.id (maintaining the order of the start/end Bookmark tags - Map<Integer, Integer> oldToNewAmlIds = new HashMap<Integer, Integer>(); + Map<Integer, Integer> oldToNewAmlIds = new HashMap<>(); for (Node node : nodes) { if (isStartNode(node) || isEndNode(node)) { changesMade = true; 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 cd00a798ce6..548d5c6e2fa 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 @@ -93,7 +93,7 @@ public class WordUtil { */ public static String reassignBinDataID(String content) { ChangeSet changeSet = new ChangeSet(content); - Map<String, String> guidMap = new HashMap<String, String>(); + Map<String, String> guidMap = new HashMap<>(); binIdMatcher.reset(content); boolean atLeastOneMatch = false; @@ -132,7 +132,7 @@ public class WordUtil { chStmt.runPreparedQuery(SELECT_WORD_VALUES, artId, CoreAttributeTypes.WordTemplateContent.getGuid(), branch.getUuid()); - List<Pair<String, Integer>> values = new LinkedList<Pair<String, Integer>>(); + List<Pair<String, Integer>> values = new LinkedList<>(); while (chStmt.next()) { String content; try { @@ -153,7 +153,7 @@ public class WordUtil { if (iter.hasNext()) { Pair<String, Integer> newest; Pair<String, Integer> nextNewest = iter.next(); - Collection<Integer> repeatGammas = new LinkedList<Integer>(); + Collection<Integer> repeatGammas = new LinkedList<>(); while (iter.hasNext()) { newest = nextNewest; nextNewest = iter.next(); @@ -217,7 +217,7 @@ public class WordUtil { } public static String referencesOnly(String content) { - List<String> references = new ArrayList<String>(); + List<String> references = new ArrayList<>(); Matcher referenceMatcher = referencePattern.matcher(content); while (referenceMatcher.find()) { |