This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-configuration.git
The following commit(s) were added to refs/heads/master by this push: new d861304 Workaround OpenJDK 8 and 9 bug JDK-8177809. d861304 is described below commit d86130481ef43d11489cd9b1cb5dd01f6f71d8bd Author: Gary Gregory <gardgreg...@gmail.com> AuthorDate: Tue Sep 10 23:09:07 2019 -0400 Workaround OpenJDK 8 and 9 bug JDK-8177809. https://bugs.openjdk.java.net/browse/JDK-8177809 --- .../reloading/TestVFSFileHandlerReloadingDetector.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java b/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java index 78ee00b..7f9b808 100644 --- a/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java +++ b/src/test/java/org/apache/commons/configuration2/reloading/TestVFSFileHandlerReloadingDetector.java @@ -23,6 +23,7 @@ import static org.junit.Assert.assertNotNull; import java.io.File; import java.io.FileWriter; import java.io.IOException; +import java.nio.file.Files; import org.apache.commons.configuration2.ConfigurationAssert; import org.apache.commons.configuration2.ex.ConfigurationRuntimeException; @@ -77,13 +78,14 @@ public class TestVFSFileHandlerReloadingDetector { final File file = folder.newFile(); writeTestFile(file, "value1"); - final VFSFileHandlerReloadingDetector strategy = - new VFSFileHandlerReloadingDetector(); + final VFSFileHandlerReloadingDetector strategy = new VFSFileHandlerReloadingDetector(); strategy.getFileHandler().setFile(file); strategy.getFileHandler().setFileSystem(new VFSFileSystem()); final long modificationDate = strategy.getLastModificationDate(); - assertEquals("Wrong modification date", file.lastModified(), - modificationDate); + // Workaround OpenJDK 8 and 9 bug JDK-8177809 + // https://bugs.openjdk.java.net/browse/JDK-8177809 + final long expectedMillis = Files.getLastModifiedTime(file.toPath()).toMillis(); + assertEquals("Wrong modification date", expectedMillis, modificationDate); } /**