anonymous wrote :
| File updateFile = new File(rootFile, "test.jsp");
| assertTrue(updateFile.setLastModified(System.currentTimeMillis()));
As per the javadoc of java.io.File.setLastModified:
anonymous wrote : All platforms support file-modification times to the nearest
second, but some provide more precision. The argument will be truncated to fit the
supported precision. If the operation succeeds and no intervening operations on the file
take place, then the next invocation of the lastModified() method will return the
(possibly truncated) time argument that was passed to this method.
|
|
So unless there is a difference of 1 second, there's no guarantee of that test case
passing on all platforms. I guess the test case could be changed to add some delay before
updating the last modified timestamp on the original file.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225317#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...