Commit 39be2ccf by nixonrodrigues

ATLAS-2376: Fix for unitTest case in ExportServiceTest due to NPE

parent bd87c3f6
...@@ -457,10 +457,14 @@ public class ExportService { ...@@ -457,10 +457,14 @@ public class ExportService {
} }
private void removeRelationshipAttributes(AtlasEntityWithExtInfo entity) { private void removeRelationshipAttributes(AtlasEntityWithExtInfo entity) {
entity.getEntity().getRelationshipAttributes().clear(); if (entity.getEntity().getRelationshipAttributes() != null) {
if(entity.getReferredEntities() != null) { entity.getEntity().getRelationshipAttributes().clear();
for (AtlasEntity e: entity.getReferredEntities().values()) { }
e.getRelationshipAttributes().clear(); if (entity.getReferredEntities() != null) {
for (AtlasEntity e : entity.getReferredEntities().values()) {
if (e.getRelationshipAttributes() != null) {
e.getRelationshipAttributes().clear();
}
} }
} }
} }
......
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