From 7c7fee89720151ec426aba3a928df2ad71dd8077 Mon Sep 17 00:00:00 2001 From: Chandan Ghosh Date: Thu, 29 Nov 2018 16:59:38 +0530 Subject: 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 --- .../src/main/java/org/onap/ccsdk/sli/adaptors/ra/ResourceAllocator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'resource-assignment/provider/src/main/java') 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 5700cd72a..e31ce7ec2 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 rdlist = endPointAllocator.getResourcesForTarget(rr.resourceTargetTypeFilter, rr.resourceTargetIdFilter, rr.resourceName); -- cgit 1.2.3-korg