You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by ra...@apache.org on 2022/06/01 23:26:16 UTC
[atlas] branch branch-2.0 updated: ATLAS-4605 Prevent NullPointerException when Atlas Vertex is empty because of corrupted data
This is an automated email from the ASF dual-hosted git repository.
radhikakundam 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 484a2603d ATLAS-4605 Prevent NullPointerException when Atlas Vertex is empty because of corrupted data
484a2603d is described below
commit 484a2603da6259de26a4cc4dfcf478fafec9c5a4
Author: Mandar Ambawane <ma...@freestoneinfotech.com>
AuthorDate: Wed May 18 15:47:24 2022 +0530
ATLAS-4605 Prevent NullPointerException when Atlas Vertex is empty because of corrupted data
Signed-off-by: radhikakundam <ra...@apache.org>
(cherry picked from commit 5bddf56a2b719adca5a43ce8ce307efaa6e023e8)
---
.../apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
index fcd8dfe7f..a8fe5a762 100644
--- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
+++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
@@ -1519,6 +1519,10 @@ public class EntityGraphRetriever {
}
if (referenceVertex != null) {
+ if (CollectionUtils.isEmpty(referenceVertex.getPropertyKeys())) {
+ LOG.warn("Reference vertex found empty with vertexId: {} . Returning AtlasRelatedObjectId object as null", referenceVertex.getId());
+ return null;
+ }
String entityTypeName = getTypeName(referenceVertex);
String entityGuid = getGuid(referenceVertex);
AtlasEntity.Status entityStatus = GraphHelper.getStatus(referenceVertex);