diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java')
-rw-r--r-- | plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java index b6564b35c66..d3600a7b9dc 100644 --- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java +++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/httpRequests/BaseArtifactLoopbackCmd.java @@ -31,14 +31,13 @@ public abstract class BaseArtifactLoopbackCmd implements IClientLoopbackCmd { @Override public void execute(final Map<String, String> parameters, final HttpResponse httpResponse) { - final String branchGuid = parameters.get("branchGuid"); final String branchId = parameters.get("branchId"); final String guid = parameters.get("guid"); final boolean isDeleted = Boolean.valueOf(parameters.get("isDeleted")); final DeletionFlag searchDeleted = isDeleted ? INCLUDE_DELETED : EXCLUDE_DELETED; final String transactionIdStr = parameters.get("transactionId"); - boolean haveAValidBranchIdentifier = Strings.isValid(branchGuid) || Strings.isValid(branchId); + boolean haveAValidBranchIdentifier = Strings.isValid(branchId); if (!Strings.isValid(guid) || !haveAValidBranchIdentifier) { httpResponse.outputStandardError(HttpURLConnection.HTTP_BAD_REQUEST, String.format("Unable to process [%s]", parameters)); @@ -52,11 +51,7 @@ public abstract class BaseArtifactLoopbackCmd implements IClientLoopbackCmd { branch = transactionId.getBranch(); artifact = ArtifactQuery.getHistoricalArtifactFromId(guid, transactionId, searchDeleted); } else { - if (Strings.isValid(branchGuid)) { - branch = BranchManager.getBranchByGuid(branchGuid); - } else { - branch = BranchManager.getBranch(Long.parseLong(branchId)); - } + branch = BranchManager.getBranch(Long.parseLong(branchId)); artifact = ArtifactQuery.getArtifactFromId(guid, branch, searchDeleted); } if (artifact == null) { |