[
https://issues.apache.org/jira/browse/AMQ-9830?focusedWorklogId=1001468&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1001468
]
ASF GitHub Bot logged work on AMQ-9830:
---------------------------------------
Author: ASF GitHub Bot
Created on: 23/Jan/26 00:19
Start Date: 23/Jan/26 00:19
Worklog Time Spent: 10m
Work Description: 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.
Issue Time Tracking
-------------------
Worklog Id: (was: 1001468)
Time Spent: 20m (was: 10m)
> Replace commons-io test usage in activemq-jaas with Java NIO
> ------------------------------------------------------------
>
> Key: AMQ-9830
> URL: https://issues.apache.org/jira/browse/AMQ-9830
> Project: ActiveMQ
> Issue Type: Task
> Reporter: Matt Pavlovich
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact