From 6f98c7426c13aeae55d3bf46ef0c93e8e24a8929 Mon Sep 17 00:00:00 2001 From: Tal Gitelman Date: Mon, 22 Oct 2018 10:25:50 +0300 Subject: fix a sonar NullPointerException issue in ABL Change-Id: I3ee02af56d3073f1e68cefd2a6503cb804af3ffb Issue-ID: SDC-1831 Signed-off-by: Tal Gitelman --- .../sdc/be/components/impl/ArtifactsBusinessLogic.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'catalog-be/src') 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 -- cgit 1.2.3-korg