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 <[email protected]>
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 <[email protected]>
(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);