diff options
-rw-r--r-- | resource-assignment/provider/src/main/java/org/onap/ccsdk/sli/adaptors/rm/dao/jdbc/ResourceDaoImpl.java | 18 |
1 files changed, 10 insertions, 8 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 7db37fff5..58f103655 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 @@ -331,14 +331,16 @@ public class ResourceDaoImpl implements ResourceDao { ai = rai; } - ai.resourceType = r.resourceType; - ai.resourceKey = r.resourceKey; - ai.resourceSetId = aiEntity.resourceSetId; - ai.resourceUnionId = aiEntity.resourceUnionId; - if (aiEntity.resourceShareGroupList != null) - ai.resourceShareGroupList = new HashSet<String>(StrUtil.listStr(aiEntity.resourceShareGroupList)); - ai.applicationId = aiEntity.applicationId; - ai.allocationTime = aiEntity.allocationTime; + if (ai!=null) { + ai.resourceType = r.resourceType; + ai.resourceKey = r.resourceKey; + ai.resourceSetId = aiEntity.resourceSetId; + ai.resourceUnionId = aiEntity.resourceUnionId; + if (aiEntity.resourceShareGroupList != null) + ai.resourceShareGroupList = new HashSet<String>(StrUtil.listStr(aiEntity.resourceShareGroupList)); + ai.applicationId = aiEntity.applicationId; + ai.allocationTime = aiEntity.allocationTime; + } return ai; } |