summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>2019-09-11 12:58:01 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-11 12:58:01 +0000
commit862c7e03f4330d9ae8f9e73c912e74064294f9ce (patch)
tree3dec6d94a69d5f0a8c81f4cd77bf7342b2fa5ec8
parent6a6ac7539aeeb83bab6d87798f1ef1a0ba98597f (diff)
parentd99d0a3ef409b634ce257bbf5ecb783c0e4ebff8 (diff)
Merge "Removed redundant null checks (at these points vnfCustom can be empty, but not null)"
-rw-r--r--adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/VnfRestImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/VnfRestImpl.java b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/VnfRestImpl.java
index 4353526872..a3e3a8ee53 100644
--- a/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/VnfRestImpl.java
+++ b/adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/VnfRestImpl.java
@@ -72,7 +72,7 @@ public class VnfRestImpl {
List<VnfResourceCustomization> vnfCustom = service.getVnfCustomizations().stream()
.filter(vnfCust -> vnfCust.getModelCustomizationUUID().equals(modelCustomizationUUID))
.collect(Collectors.toList());
- if (vnfCustom.isEmpty() || vnfCustom == null) {
+ if (vnfCustom.isEmpty()) {
return null;
} else if (vnfCustom.size() > 1) {
throw new RuntimeException(
@@ -92,7 +92,7 @@ public class VnfRestImpl {
List<VnfResourceCustomization> vnfCustom = service.getVnfCustomizations().stream()
.filter(vnfCust -> vnfCust.getModelCustomizationUUID().equals(modelCustomizationUUID))
.collect(Collectors.toList());
- if (vnfCustom.isEmpty() || vnfCustom == null) {
+ if (vnfCustom.isEmpty()) {
throw new RuntimeException("No Vnf Found");
} else if (vnfCustom.size() > 1) {
throw new RuntimeException(