exceptionfactory commented on code in PR #10405:
URL: https://github.com/apache/nifi/pull/10405#discussion_r2470982620


##########
nifi-extension-bundles/nifi-extension-utils/nifi-file-transfer/src/main/java/org/apache/nifi/processor/util/file/transfer/FetchFileTransfer.java:
##########
@@ -403,4 +452,19 @@ public long getLastUsed() {
             return this.lastUsed;
         }
     }
+    /**
+     * Generates a unique filename by using a UUID prefix.
+     * This approach virtually eliminates the possibility of name collisions 
without requiring multiple remote file checks.
+     */
+    private static String generateUniqueFilename(final FileTransfer transfer,
+                                                 final String path,
+                                                 final String baseFileName,
+                                                 final FlowFile flowFile,
+                                                 final ComponentLog logger) 
throws IOException {

Review Comment:
   With the log message where this is called, most of these arguments are no 
longer needed. On review, I recommend removing this method completely and 
building the filename inside the case statement block.



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