Skip to content

Commit

Permalink
Merge pull request #2890 from atlanhq/PLT-1036
Browse files Browse the repository at this point in the history
Fixed a NPE occuring when AtlasEntity did not have any classifications.
  • Loading branch information
hr2904 authored Mar 22, 2024
2 parents b190e15 + 35b057f commit 5214a00
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,10 @@ private EntityMutationContext preCreateOrUpdate(EntityStream entityStream, Entit
for (Map.Entry<String, String> element : referencedGuids.entrySet()) {
String guid = element.getKey();
AtlasEntity entity = entityStream.getByGuid(guid);
entityRetriever.verifyClassificationsPropagationMode(entity.getClassifications());

if(Objects.nonNull(entity) && Objects.nonNull(entity.getClassifications())) {
entityRetriever.verifyClassificationsPropagationMode(entity.getClassifications());
}
if (entity != null) { // entity would be null if guid is not in the stream but referenced by an entity in the stream
AtlasEntityType entityType = typeRegistry.getEntityTypeByName(entity.getTypeName());

Expand Down

0 comments on commit 5214a00

Please sign in to comment.