From de228cef5770b37861ac7211343086613b21d527 Mon Sep 17 00:00:00 2001 From: franciscovila Date: Thu, 6 Jan 2022 16:51:58 +0000 Subject: Fix NPE in ArtifactsBusinessLogic Sonar reflects: NullPointerException will be thrown when invoking method validateOrSetArtifactGroupType() Issue-ID: SDC-3828 Signed-off-by: franciscovila Change-Id: Ic228dedb9719f10be57278ae485a24250e412eab --- .../org/openecomp/sdc/be/components/impl/ArtifactsBusinessLogic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'catalog-be/src/main/java') 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 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())) { -- cgit 1.2.3-korg