Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan D. Brooks2017-09-08 19:12:30 -0400
committerRyan D. Brooks2017-09-12 11:49:56 -0400
commit397dfd0ab0aa53b33f787a32727c1f10fa82fce7 (patch)
tree1866a5cc7bb482c5ff9a179cfe9ccef751f99c99
parent3e5088b75f0c3a5473f48ecf4698f461d3f7165a (diff)
downloadorg.eclipse.osee-397dfd0ab0aa53b33f787a32727c1f10fa82fce7.tar.gz
org.eclipse.osee-397dfd0ab0aa53b33f787a32727c1f10fa82fce7.tar.xz
org.eclipse.osee-397dfd0ab0aa53b33f787a32727c1f10fa82fce7.zip
refactor: Client attribute logic cleanup
-rw-r--r--plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/Artifact.java4
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/artifact/ArtifactLoader.java2
3 files changed, 4 insertions, 6 deletions
diff --git a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java
index 47107b373a..b6abddb47f 100644
--- a/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java
+++ b/plugins/org.eclipse.osee.client.integration.tests/src/org/eclipse/osee/client/integration/tests/integration/skynet/core/utils/ConflictTestManager.java
@@ -18,9 +18,9 @@ import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import org.eclipse.osee.client.integration.tests.integration.skynet.core.ConflictDeletionTest;
+import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.BranchId;
import org.eclipse.osee.framework.core.data.IArtifactType;
-import org.eclipse.osee.framework.core.data.AttributeTypeId;
import org.eclipse.osee.framework.core.data.IOseeBranch;
import org.eclipse.osee.framework.core.enums.CoreArtifactTypes;
import org.eclipse.osee.framework.core.enums.CoreAttributeTypes;
@@ -630,7 +630,7 @@ public class ConflictTestManager {
public static Object stringToObject(Class clas, String value) {
if (clas.equals(BooleanAttribute.class)) {
- return Boolean.valueOf(value.equals(BooleanAttribute.booleanChoices[0]));
+ return Boolean.valueOf(value);
}
if (clas.equals(IntegerAttribute.class)) {
if (value.equals("")) {
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 79057c3df5..7db3c48d2f 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
@@ -450,9 +450,7 @@ public class Artifact extends FullyNamedIdentity<String> implements IArtifact, A
try {
attribute = attributeClass.newInstance();
attributes.put(attributeType, attribute);
- } catch (InstantiationException ex) {
- OseeCoreException.wrapAndThrow(ex);
- } catch (IllegalAccessException ex) {
+ } catch (InstantiationException | IllegalAccessException ex) {
OseeCoreException.wrapAndThrow(ex);
}
return attribute;
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 14e8a1ef8b..8b79b11040 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
@@ -169,7 +169,7 @@ public final class ArtifactLoader {
lock = new ReentrantLock();
lock.lock();
loadingActiveMap.put(artId, branchUuid, lock);
- } else {
+ } else if (!lock.isHeldByCurrentThread()) {
// another thread is loading the artifact, do not load it
locks.put(artId, branchUuid, lock);
doNotLoad = true;

Back to the top