dan-s1 commented on code in PR #8503:
URL: https://github.com/apache/nifi/pull/8503#discussion_r1526778589


##########
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/SFTPTransfer.java:
##########
@@ -110,6 +110,16 @@ private static String 
convertFactorySetToString(Set<String> factorySetNames) {
                 .collect(Collectors.joining(", "));
     }
 
+    private static String buildFullPath(String path, String filename) {
+        if (path == null) return filename;
+        if (path.endsWith("/")) return path + filename;
+        return path + "/" + filename;

Review Comment:
   While this code is valid I have noticed in the NIFI code the importance for 
readability, I would suggest expanding to the code below or what I originally 
suggested using `else if` and `else`
   ```suggestion
           if (path == null) {
                return filename;
           }
           
           if (path.endsWith("/")) { 
               return path + filename;
           }
            
           return path + "/" + filename;
   ```



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