This is an automated email from the ASF dual-hosted git repository.
radhikakundam pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/master by this push:
new 5bddf56a2 ATLAS-4605 Prevent NullPointerException when Atlas Vertex is
empty because of corrupted data
5bddf56a2 is described below
commit 5bddf56a2b719adca5a43ce8ce307efaa6e023e8
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]>
---
.../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);