Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2015-09-28 18:49:18 +0000
committerRyan D. Brooks2015-09-28 18:49:18 +0000
commit071fcbc5cca4e22e650bb459701f5fc9be701013 (patch)
treeac629d866ecfea675bc4e134c68315440282d560 /plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src
parentb4f6f62b0d3af365b67a3786dbb24c97fa638536 (diff)
downloadorg.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.gz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.tar.xz
org.eclipse.osee-071fcbc5cca4e22e650bb459701f5fc9be701013.zip
refactor: Use type inference when invoking a generic constructor
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src')
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java2
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java10
4 files changed, 8 insertions, 8 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java
index 5221f86b298..882413d83f9 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/ArtifactDataProviderImpl.java
@@ -88,7 +88,7 @@ public final class ArtifactDataProviderImpl implements ArtifactDataProvider {
@Override
public Collection<ArtifactProxy> getHierarchy() {
- Collection<ArtifactProxy> hierarchy = new HashSet<ArtifactProxy>();
+ Collection<ArtifactProxy> hierarchy = new HashSet<>();
try {
Artifact artifactPtr = self.getParent();
while (artifactPtr != null) {
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java
index 839ae398877..cd7f8155b44 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeDslArtifactUpdateOperation.java
@@ -54,7 +54,7 @@ public class OseeDslArtifactUpdateOperation extends AbstractOperation {
double workPercentage = 0.80 * 1.0 / segments.size();
int workAmount = calculateWork(workPercentage);
- Map<Branch, SkynetTransaction> transactionMap = new HashMap<Branch, SkynetTransaction>();
+ Map<Branch, SkynetTransaction> transactionMap = new HashMap<>();
for (OseeDslSegment segment : segments) {
int startAt = segment.start();
int endAt = segment.end();
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java
index 97e4005f93a..e8687a0126b 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/internal/OseeTypeModifier.java
@@ -62,7 +62,7 @@ public class OseeTypeModifier implements AttributeModifier {
OseeExceptions.wrapAndThrow(ex);
}
- Set<Long> uuids = new HashSet<Long>();
+ Set<Long> uuids = new HashSet<>();
for (EObject object : oseeDsl.eContents()) {
if (object instanceof OseeType) {
addUuid(uuids, (OseeType) object);
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java
index 6e4342f1de2..d356c639893 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.ui.integration/src/org/eclipse/osee/framework/core/dsl/ui/integration/operations/OseeDslRoleContextProvider.java
@@ -76,13 +76,13 @@ public class OseeDslRoleContextProvider implements RoleContextProvider {
Set<Role> applicableRoles = getApplicableRoles(dsl.getRoleDeclarations(), applicableGuids);
if (!applicableRoles.isEmpty()) {
- Map<String, String> accessContextMap = new HashMap<String, String>();
+ Map<String, String> accessContextMap = new HashMap<>();
for (AccessContext ac : dsl.getAccessDeclarations()) {
accessContextMap.put(ac.getName(), ac.getGuid());
}
//now get the context id's
- toReturn = new HashSet<IAccessContextId>();
+ toReturn = new HashSet<>();
for (Role role : applicableRoles) {
for (ReferencedContext ref : role.getReferencedContexts()) {
String contextName = ref.getAccessContextRef();
@@ -95,7 +95,7 @@ public class OseeDslRoleContextProvider implements RoleContextProvider {
}
private Set<Role> getApplicableRoles(List<Role> roles, List<String> applicableGuids) {
- Queue<Role> applicableRoles = new LinkedList<Role>();
+ Queue<Role> applicableRoles = new LinkedList<>();
for (Role role : roles) {
for (UsersAndGroups uag : role.getUsersAndGroups()) {
if (applicableGuids.contains(uag.getUserOrGroupGuid()) && !applicableRoles.contains(role)) {
@@ -105,13 +105,13 @@ public class OseeDslRoleContextProvider implements RoleContextProvider {
}
}
- Set<Role> includesInherited = new HashSet<Role>();
+ Set<Role> includesInherited = new HashSet<>();
getSuperRoles(includesInherited, applicableRoles);
return includesInherited;
}
private List<String> getApplicableGuids(Artifact user) {
- List<String> applicableGuids = new LinkedList<String>();
+ List<String> applicableGuids = new LinkedList<>();
List<Artifact> groups = Collections.emptyList();
try {

Back to the top