You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by am...@apache.org on 2021/05/26 22:14:50 UTC

[atlas] branch branch-2.0 updated: ATLAS-4310: Handled NPE for DELETE classification.

This is an automated email from the ASF dual-hosted git repository.

amestry pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 4e0228a  ATLAS-4310: Handled NPE for DELETE classification.
4e0228a is described below

commit 4e0228ac7030e4f76c98b86c0625f984731c00fe
Author: Ashutosh Mestry <am...@cloudera.com>
AuthorDate: Wed May 26 13:58:03 2021 -0700

    ATLAS-4310: Handled NPE for DELETE classification.
---
 .../org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
index 5baff33..b51cbfc 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphMapper.java
@@ -2508,13 +2508,13 @@ public class EntityGraphMapper {
             }
 
             AtlasVertex classificationVertex = graph.getVertex(classificationVertexId);
-            AtlasClassification classification     = entityRetriever.toAtlasClassification(classificationVertex);
             if (classificationVertex == null) {
                 LOG.warn("deleteClassificationPropagation(classificationVertexId={}): classification vertex not found", classificationVertexId);
 
                 return null;
             }
 
+            AtlasClassification classification = entityRetriever.toAtlasClassification(classificationVertex);
             List<AtlasVertex> entityVertices = deleteDelegate.getHandler().removeTagPropagation(classificationVertex);
             deleteDelegate.getHandler().deleteClassificationVertex(classificationVertex, true);
             if (CollectionUtils.isEmpty(entityVertices)) {