Commit 7892a331 by Sarath Subramanian

ATLAS-2299: Regression : Creating an entity of unknown type throws NPE

parent 1c58f3aa
...@@ -345,6 +345,10 @@ public class AtlasEntityGraphDiscoveryV1 implements EntityGraphDiscovery { ...@@ -345,6 +345,10 @@ public class AtlasEntityGraphDiscoveryV1 implements EntityGraphDiscovery {
AtlasEntityType type = typeRegistry.getEntityTypeByName(entity.getTypeName()); AtlasEntityType type = typeRegistry.getEntityTypeByName(entity.getTypeName());
if (type == null) {
throw new AtlasBaseException(AtlasErrorCode.UNKNOWN_TYPENAME, entity.getTypeName());
}
recordObjectReference(entity.getGuid()); recordObjectReference(entity.getGuid());
visitEntity(type, entity); visitEntity(type, entity);
......
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