dongjoon-hyun commented on a change in pull request #35559:
URL: https://github.com/apache/spark/pull/35559#discussion_r814379203



##########
File path: 
common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/ExecutorDiskUtils.java
##########
@@ -38,9 +38,9 @@ public static File getFile(String[] localDirs, int 
subDirsPerLocalDir, String fi
     // Unfortunately, we cannot just call the normalization code that 
java.io.File
     // uses, since it is in the package-private class java.io.FileSystem.
     // So we are creating a File just to get the normalized path back to 
intern it.
-    // Finally a new File is built and returned with this interned normalized 
path.
+    // We return this interned normalized path.
     final String normalizedInternedPath = new 
File(notNormalizedPath).getPath().intern();
-    return new File(normalizedInternedPath);
+    return normalizedInternedPath;

Review comment:
       At this PR, shall we return it simply instead of defining `final String`?
   ```java
   - final String normalizedInternedPath = new 
File(notNormalizedPath).getPath().intern();
   - return normalizedInternedPath;
   + return new File(notNormalizedPath).getPath().intern();
   ```




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