refactor: Client attribute logic cleanup
Change-Id: I597ad325038d007f0092058fc05f9f11a30bcd5b
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 47107b3..b6abddb 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.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 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 79057c3..7db3c48 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 @@
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 14e8a1e..8b79b11 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 @@
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;