From 692864abe5e152afd9f33c0fc4c2837629a39e69 Mon Sep 17 00:00:00 2001 From: Nikhil P Bonte Date: Fri, 15 Sep 2023 14:30:57 +0530 Subject: [PATCH] Fix NPE while updarting Soft deleted Query --- .../store/graph/v2/preprocessor/PreProcessorUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java index 2803562e2b..6c84900460 100644 --- a/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java +++ b/repository/src/main/java/org/apache/atlas/repository/store/graph/v2/preprocessor/PreProcessorUtils.java @@ -73,7 +73,7 @@ public static String updateQueryResourceAttributes(AtlasTypeRegistry typeRegistr entity.setAttribute(QUALIFIED_NAME, qualifiedName); //Check if parent attribute is changed - if (parentAttribute.getAttributeType().areEqualValues(currentParentObjectId, newParentObjectId, context.getGuidAssignments())) { + if (currentParentObjectId == null || parentAttribute.getAttributeType().areEqualValues(currentParentObjectId, newParentObjectId, context.getGuidAssignments())) { return null; }