diff options
author | Ryan D. Brooks | 2017-09-08 23:12:30 +0000 |
---|---|---|
committer | Ryan D. Brooks | 2017-09-12 15:49:56 +0000 |
commit | 397dfd0ab0aa53b33f787a32727c1f10fa82fce7 (patch) | |
tree | 1866a5cc7bb482c5ff9a179cfe9ccef751f99c99 | |
parent | 3e5088b75f0c3a5473f48ecf4698f461d3f7165a (diff) | |
download | org.eclipse.osee-397dfd0ab0aa53b33f787a32727c1f10fa82fce7.tar.gz org.eclipse.osee-397dfd0ab0aa53b33f787a32727c1f10fa82fce7.tar.xz org.eclipse.osee-397dfd0ab0aa53b33f787a32727c1f10fa82fce7.zip |
refactor: Client attribute logic cleanup
Change-Id: I597ad325038d007f0092058fc05f9f11a30bcd5b
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 47107b373ac..b6abddb47ff 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 79057c3df5a..7db3c48d2f5 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 14e8a1ef8b0..8b79b110409 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; |