Commit 6a1c4f4d by Madhan Neethiraj

ATLAS-2251: fixed NPE in V1 to V2 entity conversion

parent 41e5404f
......@@ -66,10 +66,14 @@ public class AtlasEntityFormatConverter extends AtlasStructFormatConverter {
entity.setGuid(entRef.getId().getId());
entity.setStatus(convertState(entRef.getId().getState()));
if (entRef.getSystemAttributes() != null) {
entity.setCreatedBy(entRef.getSystemAttributes().getCreatedBy());
entity.setCreateTime(entRef.getSystemAttributes().getCreatedTime());
entity.setUpdatedBy(entRef.getSystemAttributes().getModifiedBy());
entity.setUpdateTime(entRef.getSystemAttributes().getModifiedTime());
}
entity.setVersion((long) entRef.getId().getVersion());
if (CollectionUtils.isNotEmpty(entRef.getTraitNames())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment