From 5ade7c2d9f4dbb96692c8d3d53f0005df8cb43b5 Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Wed, 24 Mar 2021 10:33:13 -0400 Subject: Fix null pointer exception Fix null pointer exception in case of empty list Issue-ID: CCSDK-3237 Signed-off-by: Dan Timoney Change-Id: Ic94d60bf7a52c23507ecc2402f9be9b580f2ea5b --- core/artifacts/pom.xml | 2 +- core/dblib/installer/pom.xml | 2 +- core/dblib/pom.xml | 2 +- core/dblib/provider/pom.xml | 2 +- core/features/ccsdk-dblib/pom.xml | 2 +- core/features/ccsdk-filters/pom.xml | 2 +- core/features/ccsdk-sli-core-all/pom.xml | 2 +- core/features/ccsdk-sli/pom.xml | 2 +- core/features/ccsdk-sliPluginUtils/pom.xml | 2 +- core/features/ccsdk-sliapi/pom.xml | 2 +- core/features/ccsdk-slicore-utils/pom.xml | 2 +- core/features/features-sli-core/pom.xml | 2 +- core/features/installer/pom.xml | 2 +- core/features/pom.xml | 2 +- core/filters/installer/pom.xml | 2 +- core/filters/pom.xml | 2 +- core/filters/provider/pom.xml | 2 +- core/pom.xml | 2 +- core/sli/common/pom.xml | 2 +- core/sli/installer/pom.xml | 2 +- core/sli/model/pom.xml | 2 +- core/sli/pom.xml | 2 +- core/sli/provider-base/pom.xml | 2 +- core/sli/provider/pom.xml | 2 +- .../main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java | 5 ++++- core/sliPluginUtils/installer/pom.xml | 2 +- core/sliPluginUtils/pom.xml | 2 +- core/sliPluginUtils/provider/pom.xml | 2 +- core/sliapi/installer/pom.xml | 2 +- core/sliapi/model/pom.xml | 2 +- core/sliapi/model/swagger/pom.xml | 2 +- core/sliapi/model/yang/pom.xml | 2 +- core/sliapi/pom.xml | 2 +- core/sliapi/provider/pom.xml | 2 +- core/utils/installer/pom.xml | 2 +- core/utils/pom.xml | 2 +- core/utils/provider/pom.xml | 2 +- 37 files changed, 40 insertions(+), 37 deletions(-) (limited to 'core') diff --git a/core/artifacts/pom.xml b/core/artifacts/pom.xml index cc380a48e..688b29c16 100755 --- a/core/artifacts/pom.xml +++ b/core/artifacts/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/dblib/installer/pom.xml b/core/dblib/installer/pom.xml index 8a594ffae..c15f5d432 100755 --- a/core/dblib/installer/pom.xml +++ b/core/dblib/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/dblib/pom.xml b/core/dblib/pom.xml index bc7ff901f..8a466fa46 100755 --- a/core/dblib/pom.xml +++ b/core/dblib/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/dblib/provider/pom.xml b/core/dblib/provider/pom.xml index 61123cb85..2ae40712e 100755 --- a/core/dblib/provider/pom.xml +++ b/core/dblib/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/features/ccsdk-dblib/pom.xml b/core/features/ccsdk-dblib/pom.xml index 656dfc628..ba5e04bfb 100644 --- a/core/features/ccsdk-dblib/pom.xml +++ b/core/features/ccsdk-dblib/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.1 + 2.1.2 diff --git a/core/features/ccsdk-filters/pom.xml b/core/features/ccsdk-filters/pom.xml index b7f429378..62918491a 100644 --- a/core/features/ccsdk-filters/pom.xml +++ b/core/features/ccsdk-filters/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.1 + 2.1.2 diff --git a/core/features/ccsdk-sli-core-all/pom.xml b/core/features/ccsdk-sli-core-all/pom.xml index 748d4e4e3..f4253ad60 100644 --- a/core/features/ccsdk-sli-core-all/pom.xml +++ b/core/features/ccsdk-sli-core-all/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.1 + 2.1.2 diff --git a/core/features/ccsdk-sli/pom.xml b/core/features/ccsdk-sli/pom.xml index 36f03842a..c91b0b7b7 100644 --- a/core/features/ccsdk-sli/pom.xml +++ b/core/features/ccsdk-sli/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.1 + 2.1.2 diff --git a/core/features/ccsdk-sliPluginUtils/pom.xml b/core/features/ccsdk-sliPluginUtils/pom.xml index d63c89e32..eeff8595c 100644 --- a/core/features/ccsdk-sliPluginUtils/pom.xml +++ b/core/features/ccsdk-sliPluginUtils/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.1 + 2.1.2 diff --git a/core/features/ccsdk-sliapi/pom.xml b/core/features/ccsdk-sliapi/pom.xml index edd4cc39d..30dc863c6 100644 --- a/core/features/ccsdk-sliapi/pom.xml +++ b/core/features/ccsdk-sliapi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.1 + 2.1.2 diff --git a/core/features/ccsdk-slicore-utils/pom.xml b/core/features/ccsdk-slicore-utils/pom.xml index a2d817335..29ee0ea82 100644 --- a/core/features/ccsdk-slicore-utils/pom.xml +++ b/core/features/ccsdk-slicore-utils/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent single-feature-parent - 2.1.1 + 2.1.2 diff --git a/core/features/features-sli-core/pom.xml b/core/features/features-sli-core/pom.xml index ac12f9d00..b004763a4 100644 --- a/core/features/features-sli-core/pom.xml +++ b/core/features/features-sli-core/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent feature-repo-parent - 2.1.1 + 2.1.2 diff --git a/core/features/installer/pom.xml b/core/features/installer/pom.xml index 12255e857..44afad34c 100755 --- a/core/features/installer/pom.xml +++ b/core/features/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/features/pom.xml b/core/features/pom.xml index 3004e2d63..66cd0efb0 100755 --- a/core/features/pom.xml +++ b/core/features/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/filters/installer/pom.xml b/core/filters/installer/pom.xml index f83f22f0c..28e59e6be 100755 --- a/core/filters/installer/pom.xml +++ b/core/filters/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/filters/pom.xml b/core/filters/pom.xml index 03085af58..9c7099059 100644 --- a/core/filters/pom.xml +++ b/core/filters/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/filters/provider/pom.xml b/core/filters/provider/pom.xml index ab0b847be..2ae54ea35 100755 --- a/core/filters/provider/pom.xml +++ b/core/filters/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/pom.xml b/core/pom.xml index 63d6c9ed6..7c49390c4 100755 --- a/core/pom.xml +++ b/core/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/sli/common/pom.xml b/core/sli/common/pom.xml index 3bdfd9f1d..db117f62b 100755 --- a/core/sli/common/pom.xml +++ b/core/sli/common/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/sli/installer/pom.xml b/core/sli/installer/pom.xml index 57d04b111..75d48f2c9 100755 --- a/core/sli/installer/pom.xml +++ b/core/sli/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/sli/model/pom.xml b/core/sli/model/pom.xml index 7d0468ac4..8b7ba3681 100755 --- a/core/sli/model/pom.xml +++ b/core/sli/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/sli/pom.xml b/core/sli/pom.xml index 6c2c9febb..32ed151d9 100755 --- a/core/sli/pom.xml +++ b/core/sli/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/sli/provider-base/pom.xml b/core/sli/provider-base/pom.xml index 114b2a051..b844c3e20 100644 --- a/core/sli/provider-base/pom.xml +++ b/core/sli/provider-base/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/sli/provider/pom.xml b/core/sli/provider/pom.xml index c3826fd21..b32f293c7 100755 --- a/core/sli/provider/pom.xml +++ b/core/sli/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java b/core/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java index 94e1425cb..ce8253a5c 100755 --- a/core/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java +++ b/core/sli/provider/src/main/java/org/onap/ccsdk/sli/core/sli/provider/MdsalHelper.java @@ -299,7 +299,10 @@ public class MdsalHelper { if (!isAccessible) { m.setAccessible(true); } - Object retList = Map.class.isAssignableFrom(returnType)?new ArrayList(((Map) m.invoke(fromObj)).values()):m.invoke(fromObj); + Object retList = m.invoke(fromObj); + if ((retList != null) && Map.class.isAssignableFrom(returnType)) { + retList = new ArrayList(((Map)retList).values()); + } //due duplicated getters with Map and List(deprecated) stop if already mapped if(!hasAlreadyKeys(props,propNamePfx + "." + fieldName)) { diff --git a/core/sliPluginUtils/installer/pom.xml b/core/sliPluginUtils/installer/pom.xml index 146296d38..1c41fa16b 100755 --- a/core/sliPluginUtils/installer/pom.xml +++ b/core/sliPluginUtils/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/sliPluginUtils/pom.xml b/core/sliPluginUtils/pom.xml index 0cb797831..47bf4b761 100755 --- a/core/sliPluginUtils/pom.xml +++ b/core/sliPluginUtils/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/sliPluginUtils/provider/pom.xml b/core/sliPluginUtils/provider/pom.xml index 2d432ca36..1104c9231 100755 --- a/core/sliPluginUtils/provider/pom.xml +++ b/core/sliPluginUtils/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/sliapi/installer/pom.xml b/core/sliapi/installer/pom.xml index bd927e9c8..c3261ea6a 100755 --- a/core/sliapi/installer/pom.xml +++ b/core/sliapi/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/sliapi/model/pom.xml b/core/sliapi/model/pom.xml index afb7809a7..76a160894 100755 --- a/core/sliapi/model/pom.xml +++ b/core/sliapi/model/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/sliapi/model/swagger/pom.xml b/core/sliapi/model/swagger/pom.xml index 17edee28f..5e1344842 100644 --- a/core/sliapi/model/swagger/pom.xml +++ b/core/sliapi/model/swagger/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 org.onap.ccsdk.sli.core diff --git a/core/sliapi/model/yang/pom.xml b/core/sliapi/model/yang/pom.xml index 68c388a13..d07ffb005 100755 --- a/core/sliapi/model/yang/pom.xml +++ b/core/sliapi/model/yang/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/sliapi/pom.xml b/core/sliapi/pom.xml index ba1cc74fc..1bc01cd70 100755 --- a/core/sliapi/pom.xml +++ b/core/sliapi/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/sliapi/provider/pom.xml b/core/sliapi/provider/pom.xml index 78ba74116..6c0b60cdf 100755 --- a/core/sliapi/provider/pom.xml +++ b/core/sliapi/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 diff --git a/core/utils/installer/pom.xml b/core/utils/installer/pom.xml index 20c316711..d576e39af 100755 --- a/core/utils/installer/pom.xml +++ b/core/utils/installer/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/utils/pom.xml b/core/utils/pom.xml index 3a831d2a1..84addb38c 100755 --- a/core/utils/pom.xml +++ b/core/utils/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent odlparent-lite - 2.1.1 + 2.1.2 diff --git a/core/utils/provider/pom.xml b/core/utils/provider/pom.xml index 517df5f29..fcd48d420 100644 --- a/core/utils/provider/pom.xml +++ b/core/utils/provider/pom.xml @@ -5,7 +5,7 @@ org.onap.ccsdk.parent binding-parent - 2.1.1 + 2.1.2 -- cgit 1.2.3-korg