diff options
author | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-09-11 14:13:24 +0300 |
---|---|---|
committer | Oleksandr Moliavko <o.moliavko@samsung.com> | 2019-09-11 14:13:24 +0300 |
commit | d99d0a3ef409b634ce257bbf5ecb783c0e4ebff8 (patch) | |
tree | 8a7b769b581f74bb8882c18eace20a8164b23f44 /adapters/mso-catalog-db-adapter/src | |
parent | 0966d538f7f04dbb99e5028e09057a3e8f866cab (diff) |
Removed redundant null checks (at these points
vnfCustom can be empty, but not null)
Issue-ID: SO-1841
Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com>
Change-Id: I174635fd0df71811c05ea3ad52f8ec5e5b56c58c
Diffstat (limited to 'adapters/mso-catalog-db-adapter/src')
-rw-r--r-- | adapters/mso-catalog-db-adapter/src/main/java/org/onap/so/adapters/catalogdb/rest/VnfRestImpl.java | 4 |
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( |