anmolanmol1234 commented on code in PR #7496:
URL: https://github.com/apache/hadoop/pull/7496#discussion_r2020833634


##########
hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/services/AbfsBlobClient.java:
##########
@@ -1528,10 +1528,31 @@ public AbfsRestOperation deleteBlobPath(final Path 
blobPath,
    */
   @Override
   public boolean checkIsDir(AbfsHttpOperation result) {
-    String resourceType = result.getResponseHeader(X_MS_META_HDI_ISFOLDER);
+    String dirHeaderName = getHeaderNameIgnoreCase(result, 
X_MS_META_HDI_ISFOLDER);
+    // If the header is not found, return false (not a directory)
+    if (dirHeaderName == null) {
+      return false;
+    }
+
+    String resourceType = result.getResponseHeader(dirHeaderName);
     return resourceType != null && resourceType.equals(TRUE);

Review Comment:
   Yes since we already checked for null in the getHeaderNameIgnoreCase method, 
this repeated check may not be needed



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to