summaryrefslogtreecommitdiffstats
path: root/catalog-be
diff options
context:
space:
mode:
authorSonsino, Ofir (os0695) <os0695@intl.att.com>2018-11-22 10:13:46 +0200
committerSonsino, Ofir (os0695) <os0695@intl.att.com>2018-11-22 11:22:22 +0200
commit532db6daf1c0d0c9b0767eb7191385ad1a709516 (patch)
tree323bdb96337b86cd8cd3eed21b53c1642423cb46 /catalog-be
parent619adb5955870e3b03250262677eff9b83713f14 (diff)
DAO sonar fixes
Change-Id: I453fdb5f2aa1488adbf0664a624a98b239d4a927 Issue-ID: SDC-1954 Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'catalog-be')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
index f3cf5944b4..c53e343512 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/externalapi/servlet/ArtifactExternalServlet.java
@@ -65,7 +65,6 @@ import javax.ws.rs.core.Response;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
/**
@@ -80,6 +79,8 @@ import java.util.Map;
@Singleton
public class ArtifactExternalServlet extends AbstractValidationsServlet {
+ private static final String FAILED_TO_UPDATE_ARTIFACT = "failed to update artifact";
+
@Context
private HttpServletRequest request;
@@ -146,7 +147,7 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
Either<ArtifactDefinition, ResponseFormat> uploadArtifactEither = artifactsLogic.updateArtifactOnInterfaceOperationByResourceUUID(data, request, componentType, uuid, artifactUUID, operationUUID,
resourceCommonInfo, artifactsLogic.new ArtifactOperationInfo(true, false, ArtifactOperationEnum.UPDATE));
if (uploadArtifactEither.isRight()) {
- log.debug("failed to update artifact");
+ log.debug(FAILED_TO_UPDATE_ARTIFACT);
responseFormat = uploadArtifactEither.right().value();
responseWrapper.setInnerElement(buildErrorResponse(responseFormat));
} else {
@@ -452,7 +453,7 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
Either<ArtifactDefinition, ResponseFormat> uploadArtifactEither = artifactsLogic.updateArtifactOnComponentByUUID(data, request, componentType, uuid, artifactUUID,
resourceCommonInfo, artifactsLogic.new ArtifactOperationInfo(true, false, ArtifactOperationEnum.UPDATE));
if (uploadArtifactEither.isRight()) {
- log.debug("failed to update artifact");
+ log.debug(FAILED_TO_UPDATE_ARTIFACT);
responseFormat = uploadArtifactEither.right().value();
responseWrapper.setInnerElement(buildErrorResponse(responseFormat));
} else {
@@ -552,7 +553,7 @@ public class ArtifactExternalServlet extends AbstractValidationsServlet {
Either<ArtifactDefinition, ResponseFormat> uploadArtifactEither = artifactsLogic.updateArtifactOnRiByUUID(data, request, componentType, uuid, resourceInstanceName, artifactUUID,
artifactsLogic.new ArtifactOperationInfo(true, false, ArtifactOperationEnum.UPDATE));
if (uploadArtifactEither.isRight()) {
- log.debug("failed to update artifact");
+ log.debug(FAILED_TO_UPDATE_ARTIFACT);
responseFormat = uploadArtifactEither.right().value();
responseWrapper.setInnerElement(buildErrorResponse(responseFormat));
} else {