summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfranciscovila <javier.paradela.vila@est.tech>2022-01-06 16:51:58 +0000
committerfranciscovila <javier.paradela.vila@est.tech>2022-01-07 10:58:30 +0000
commitde228cef5770b37861ac7211343086613b21d527 (patch)
treefdd4d3d06ce1180ee391a5bc62f4266242438a8f
parentaa6fa62c587c5e3ca30dbaf880dd898ac8a094da (diff)
Fix NPE in ArtifactsBusinessLogic
Sonar reflects: NullPointerException will be thrown when invoking method validateOrSetArtifactGroupType() Issue-ID: SDC-3828 Signed-off-by: franciscovila <javier.paradela.vila@est.tech> Change-Id: Ic228dedb9719f10be57278ae485a24250e412eab
-rw-r--r--catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java2
1 files changed, 1 insertions, 1 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 7b21484a7b..10c50566d4 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
@@ -2084,7 +2084,7 @@ public class ArtifactsBusinessLogic extends BaseBusinessLogic {
private Either<ArtifactDefinition, ResponseFormat> validateOrSetArtifactGroupType(ArtifactDefinition artifactInfo,
ArtifactDefinition currentArtifact) {
- if (Objects.nonNull(artifactInfo) && Objects.nonNull(currentArtifact)) {
+ if (null != artifactInfo && null != currentArtifact) {
if (artifactInfo.getArtifactGroupType() == null) {
artifactInfo.setArtifactGroupType(currentArtifact.getArtifactGroupType());
} else if (!currentArtifact.getArtifactGroupType().getType().equalsIgnoreCase(artifactInfo.getArtifactGroupType().getType())) {