chaitalicod commented on code in PR #511:
URL: https://github.com/apache/atlas/pull/511#discussion_r3860408430


##########
repository/src/main/java/org/apache/atlas/repository/impexp/StartEntityFetchByExportRequest.java:
##########
@@ -109,6 +109,11 @@ public List<String> get(AtlasExportRequest exportRequest, 
AtlasObjectId item) {
 
                 return ret;
             }
+
+            if (StringUtils.isEmpty(item.getTypeName()) && 
MapUtils.isNotEmpty(item.getUniqueAttributes())) {
+                LOG.info("Request missing typeName but has uniqueAttributes. 
Attempting generic type search.");
+                return getEntitiesForMatchTypeType(item, MATCH_TYPE_FOR_TYPE);
+            }

Review Comment:
   NPE in get() finally block. getEntitiesForMatchTypeType → 
executeGremlinQuery returns null on ScriptException. The new fallback assigns 
that to ret and returns, triggering finally → ret.size() → NPE (also masks the 
real error). Null-guard the log, or return an empty list instead of null from 
executeGremlinQuery.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to