summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-09-19 23:48:34 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-19 23:48:34 +0000
commitfa58685070866ca95774779d0a5bc593c9a5800b (patch)
tree01749c04330353d0ff0d719e724233817ae4ac80
parent4d02e5b32dbce0815010a6bf61624420ab0ff1a3 (diff)
parentd2d5675af191d2650cf8c627268d2a9afb114a7b (diff)
Merge "Fix Sonar Issue"
-rw-r--r--resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/ResourceDaoImpl.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/ResourceDaoImpl.java b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/ResourceDaoImpl.java
index 9ee3cc188..7db37fff5 100644
--- a/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/ResourceDaoImpl.java
+++ b/resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/ResourceDaoImpl.java
@@ -298,10 +298,12 @@ public class ResourceDaoImpl implements ResourceDao {
r = rr;
}
- r.resourceType = type;
- r.resourceKey = new ResourceKey();
- r.resourceKey.assetId = resourceEntity.assetId;
- r.resourceKey.resourceName = resourceEntity.name;
+ if (r != null) {
+ r.resourceType = type;
+ r.resourceKey = new ResourceKey();
+ r.resourceKey.assetId = resourceEntity.assetId;
+ r.resourceKey.resourceName = resourceEntity.name;
+ }
return r;
}