jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java
changeset 15275 6e5b8f8361eb
parent 9035 1255eb81cc2f
child 17154 e8991539c4d7
--- a/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java	Fri Jan 18 17:34:40 2013 +0000
+++ b/jdk/test/java/nio/file/attribute/BasicFileAttributeView/Basic.java	Fri Jan 18 18:48:44 2013 +0000
@@ -49,9 +49,9 @@
         check(!attrs.isSymbolicLink(), "is not a link");
         check(!attrs.isOther(), "is not other");
 
-        // last-modified-time should match java.io.File
+        // last-modified-time should match java.io.File in seconds
         File f = new File(dir.toString());
-        check(f.lastModified() == attrs.lastModifiedTime().toMillis(),
+        check(f.lastModified()/1000 == attrs.lastModifiedTime().to(TimeUnit.SECONDS),
               "last-modified time should be the same");
     }
 
@@ -64,10 +64,10 @@
         check(!attrs.isSymbolicLink(), "is not a link");
         check(!attrs.isOther(), "is not other");
 
-        // size and last-modified-time should match java.io.File
+        // size and last-modified-time should match java.io.File in seconds
         File f = new File(file.toString());
         check(f.length() == attrs.size(), "size should be the same");
-        check(f.lastModified() == attrs.lastModifiedTime().toMillis(),
+        check(f.lastModified()/1000 == attrs.lastModifiedTime().to(TimeUnit.SECONDS),
               "last-modified time should be the same");
 
         // copy last-modified time and file create time from directory to file,