diff options
author | Dan Timoney <dtimoney@att.com> | 2017-09-19 23:48:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-19 23:48:34 +0000 |
commit | fa58685070866ca95774779d0a5bc593c9a5800b (patch) | |
tree | 01749c04330353d0ff0d719e724233817ae4ac80 /resource-assignment/provider/src | |
parent | 4d02e5b32dbce0815010a6bf61624420ab0ff1a3 (diff) | |
parent | d2d5675af191d2650cf8c627268d2a9afb114a7b (diff) |
Merge "Fix Sonar Issue"
Diffstat (limited to 'resource-assignment/provider/src')
-rw-r--r-- | resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/ResourceDaoImpl.java | 10 |
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 9ee3cc18..7db37fff 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; } |