summaryrefslogtreecommitdiffstats
path: root/resource-assignment/provider/src
diff options
context:
space:
mode:
authorChandan Ghosh <cghosh12@in.ibm.com>2018-11-29 16:59:38 +0530
committerChandan Ghosh <cghosh12@in.ibm.com>2018-11-29 16:59:45 +0530
commit7c7fee89720151ec426aba3a928df2ad71dd8077 (patch)
tree1ed2b9e309ba28fbcb1a3d792f50e1c119505964 /resource-assignment/provider/src
parent6eb11a73f23b46e94f4209687a368dc1396e5404 (diff)
Added fix for potential nullpointer exception
Added fix for potential nullpointerexception reported in sonar Issue-ID: CCSDK-767 Change-Id: Ifebf7a57f27cb0de83d3cd5e805e0547b28ee845 Signed-off-by: Chandan Ghosh <cghosh12@in.ibm.com>
Diffstat (limited to 'resource-assignment/provider/src')
-rw-r--r--resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java
index 5700cd72..e31ce7ec 100644
--- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java
+++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java
@@ -146,7 +146,7 @@ public class ResourceAllocator implements SvcLogicResource {
ResourceData rd = endPointAllocator.getResource(rt.resourceTargetType, rt.resourceTargetId, rr.resourceName,
rr.resourceEntityTypeFilter, rr.resourceEntityIdFilter, rr.resourceShareGroupFilter);
setResourceDataInResponse(Collections.singletonList(rd), rsList);
- } else if ((rr.resourceTargetTypeFilter != null || rr.resourceTargetIdFilter != null)
+ } else if ((rr!=null && rr.resourceTargetTypeFilter != null || rr.resourceTargetIdFilter != null)
&& rr.resourceName != null) {
List<ResourceData> rdlist = endPointAllocator.getResourcesForTarget(rr.resourceTargetTypeFilter,
rr.resourceTargetIdFilter, rr.resourceName);