patricker commented on a change in pull request #3229: NIFI-5894  FTPTransfer 
NullPointerException
URL: https://github.com/apache/nifi/pull/3229#discussion_r243353162
 
 

 ##########
 File path: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/util/FTPTransfer.java
 ##########
 @@ -296,13 +296,19 @@ private FileInfo newFileInfo(final FTPFile file, String 
path) {
         perms.append(file.hasPermission(FTPFile.WORLD_ACCESS, 
FTPFile.READ_PERMISSION) ? "r" : "-");
         perms.append(file.hasPermission(FTPFile.WORLD_ACCESS, 
FTPFile.WRITE_PERMISSION) ? "w" : "-");
         perms.append(file.hasPermission(FTPFile.WORLD_ACCESS, 
FTPFile.EXECUTE_PERMISSION) ? "x" : "-");
+       
+       long lastModifiedTime           = System.currentTimeMillis();
 
 Review comment:
   I'd be OK with seeing this as a one liner check/assignment:
   `final long lastModifiedTime = file.getTimestamp() != null ? 
file.getTimestamp().getTimeInMillis() : System.currentTimeMillis();`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to