From ddd9274a1010bbae92f0c5121eb90888d58354b0 Mon Sep 17 00:00:00 2001 From: Alan Bateman Date: Fri, 31 Aug 2012 12:25:37 +0100 Subject: [PATCH] 7033824: TEST_BUG: java/nio/file/Files/CopyAndMove.java fails intermittently Reviewed-by: chegar --- jdk/test/java/nio/file/Files/CopyAndMove.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/jdk/test/java/nio/file/Files/CopyAndMove.java b/jdk/test/java/nio/file/Files/CopyAndMove.java index 9ac27af0669..0becc686719 100644 --- a/jdk/test/java/nio/file/Files/CopyAndMove.java +++ b/jdk/test/java/nio/file/Files/CopyAndMove.java @@ -86,10 +86,12 @@ public class CopyAndMove { assertTrue(attrs1.isSymbolicLink() == attrs2.isSymbolicLink()); assertTrue(attrs1.isOther() == attrs2.isOther()); - // check last modified time - long time1 = attrs1.lastModifiedTime().toMillis(); - long time2 = attrs2.lastModifiedTime().toMillis(); - assertTrue(time1 == time2); + // check last modified time if not a symbolic link + if (!attrs1.isSymbolicLink()) { + long time1 = attrs1.lastModifiedTime().toMillis(); + long time2 = attrs2.lastModifiedTime().toMillis(); + assertTrue(time1 == time2); + } // check size if (attrs1.isRegularFile())