Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordonald.g.dunne2014-01-08 20:35:53 +0000
committerGerrit Code Review @ Eclipse.org2014-01-09 17:04:21 +0000
commitb18f83a0f5d96efb79c6042f40345aed11ef1821 (patch)
treeb8dbf6721f44d69d280a65521612f1292d02fbe2 /plugins
parent00e9041742923d858d4bfbb0a1ca1c7cb1bc6d48 (diff)
downloadorg.eclipse.osee-b18f83a0f5d96efb79c6042f40345aed11ef1821.tar.gz
org.eclipse.osee-b18f83a0f5d96efb79c6042f40345aed11ef1821.tar.xz
org.eclipse.osee-b18f83a0f5d96efb79c6042f40345aed11ef1821.zip
bug[ats_ATS4819]: Commit Manager shows "is not a valid guid" error
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java8
2 files changed, 12 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java
index ab13f61c07..dc81a3b3d4 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/CommitXManager.java
@@ -27,6 +27,7 @@ import org.eclipse.osee.framework.core.operation.IOperation;
import org.eclipse.osee.framework.core.operation.Operations;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
@@ -90,7 +91,10 @@ public class CommitXManager extends XViewer {
ICommitConfigArtifact configArt = null;
if (firstSelectedArt instanceof ICommitConfigArtifact) {
configArt = (ICommitConfigArtifact) firstSelectedArt;
- branch = BranchManager.getBranchByGuid(configArt.getBaslineBranchGuid());
+ String baslineBranchGuid = configArt.getBaslineBranchGuid();
+ if (Strings.isValid(baslineBranchGuid)) {
+ branch = BranchManager.getBranchByGuid(baslineBranchGuid);
+ }
displayName = configArt.toString();
} else if (firstSelectedArt instanceof TransactionRecord) {
TransactionRecord txRecord = (TransactionRecord) firstSelectedArt;
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java
index 1b24dab94b..ea0799be39 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/util/widgets/commit/XCommitLabelProvider.java
@@ -25,6 +25,7 @@ import org.eclipse.osee.framework.core.model.TransactionRecord;
import org.eclipse.osee.framework.jdk.core.type.OseeArgumentException;
import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.util.DateUtil;
+import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
@@ -103,7 +104,12 @@ public class XCommitLabelProvider extends XViewerLabelProvider {
Branch branch = null;
if (element instanceof ICommitConfigArtifact) {
ICommitConfigArtifact configArt = (ICommitConfigArtifact) element;
- branch = BranchManager.getBranchByGuid(configArt.getBaslineBranchGuid());
+ String baslineBranchGuid = configArt.getBaslineBranchGuid();
+ if (Strings.isValid(baslineBranchGuid)) {
+ branch = BranchManager.getBranchByGuid(baslineBranchGuid);
+ } else {
+ return String.format("Branch not configured for [%s]", element);
+ }
} else if (element instanceof TransactionRecord) {
TransactionRecord txRecord = (TransactionRecord) element;
branch = txRecord.getBranch();

Back to the top