summaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java
diff options
context:
space:
mode:
authorTal Gitelman <tg851x@intl.att.com>2018-10-22 10:25:50 +0300
committerMichael Lando <michael.lando@intl.att.com>2018-10-23 13:53:55 +0000
commit6f98c7426c13aeae55d3bf46ef0c93e8e24a8929 (patch)
tree762e0657ce1c315668768d8a4694f01199be3dd7 /catalog-be/src/main/java
parent9ffdb63f01a939b09a24a3d49d700d71948bd1a7 (diff)
fix a sonar NullPointerException issue in ABL
Change-Id: I3ee02af56d3073f1e68cefd2a6503cb804af3ffb Issue-ID: SDC-1831 Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
Diffstat (limited to 'catalog-be/src/main/java')
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java12
1 files changed, 3 insertions, 9 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java
index 65260c10a2..62f62f130d 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java
@@ -4803,17 +4803,11 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic {
log.debug(FAILED_UPLOAD_ARTIFACT_TO_COMPONENT, componentType, componentUuid, actionResult
.right()
.value());
- errorWrapper.setInnerElement(actionResult.right().value());
+ return Either.right(actionResult.right().value());
}
+ return Either.left(actionResult.left().value().left().value());
}
- if (errorWrapper.isEmpty()) {
- uploadArtifact = actionResult.left().value().left().value();
- uploadArtifactResult = Either.left(uploadArtifact);
- }
- else {
- uploadArtifactResult = Either.right(errorWrapper.getInnerElement());
- }
- return uploadArtifactResult;
+ return Either.right(errorWrapper.getInnerElement());
}
/**
* upload an artifact to a resource instance by UUID