bmarwell commented on code in PR #23:
URL: https://github.com/apache/maven-war-plugin/pull/23#discussion_r876247424


##########
src/main/java/org/apache/maven/plugins/war/packaging/AbstractWarPackagingTask.java:
##########
@@ -342,14 +344,16 @@ protected boolean copyFile( WarPackagingContext context, 
File source, File desti
     {
         context.addResource( targetFilename );
 
-        if ( onlyIfModified && destination.lastModified() >= 
source.lastModified() )
+        BasicFileAttributes readAttributes = Files.readAttributes( 
source.toPath(), BasicFileAttributes.class );
+        if ( onlyIfModified && destination.lastModified() >= 
readAttributes.lastModifiedTime()
+                .toMillis() )

Review Comment:
   It is okay for me. I didn't know about it, and it looked a bit harder to 
read for me at first, but if it is NIO, then big +1.



-- 
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: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to