cshannon commented on code in PR #1629:
URL: https://github.com/apache/activemq/pull/1629#discussion_r2719130114


##########
activemq-jaas/src/test/java/org/apache/activemq/jaas/PropertiesLoginModuleTest.java:
##########
@@ -92,10 +94,10 @@ public void testLoginReload() throws Exception {
 
         //Modify the file and test that the properties are reloaded
         Thread.sleep(1000);
-        FileUtils.copyFile(new File(sourcePropDir, "usersReload.properties"), 
usersFile);
-        FileUtils.copyFile(new File(sourcePropDir, "groupsReload.properties"), 
groupsFile);
-        FileUtils.touch(usersFile);
-        FileUtils.touch(groupsFile);
+        Files.copy(new File(sourcePropDir, "usersReload.properties").toPath(), 
usersFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+        Files.copy(new File(sourcePropDir, 
"groupsReload.properties").toPath(), groupsFile.toPath(), 
StandardCopyOption.REPLACE_EXISTING);
+        Files.setLastModifiedTime(usersFile.toPath(), 
FileTime.from(Instant.now()));

Review Comment:
   This doesn't seem necessary...wouldn't the Files.copy() calls above update 
the last modified time already? I realize this is replacing the 
FileUtils.touch() call but that seems unnecessary as well unless I am missing 
something.



-- 
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]
For further information, visit: https://activemq.apache.org/contact


Reply via email to