RFR: 8275536: [TEST] java.io.File and java.nio.File should return the same timestamp for lastModified

Brian Burkhalter bpb at openjdk.java.net
Thu Oct 21 02:24:09 UTC 2021


On Thu, 21 Oct 2021 00:27:20 GMT, Clive Verghese <cverghese at openjdk.org> wrote:

> The test validated that the precision returned by `java.io.File.lastModified` and `java.nio.file.Files.getLastModifiedTime` are the same.

test/jdk/java/nio/file/Files/LastModifiedTest.java line 46:

> 44: 
> 45:     @Test
> 46:     public void lastModified_ioAndNioAreAlwaysSame() throws IOException {

Generally we don't use underscores in method names in favor of, e.g., `lastModifiedIoAndNioAreAlwaysSame` but that name seems awkward in either case. Maybe `verifyLastModifiedTime()`?

-------------

PR: https://git.openjdk.java.net/jdk/pull/6054


More information about the nio-dev mailing list