fix a sonar NullPointerException issue in ABL
Change-Id: I3ee02af56d3073f1e68cefd2a6503cb804af3ffb
Issue-ID: SDC-1831
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
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 65260c1..62f62f1 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 @@
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