This is an automated email from the ASF dual-hosted git repository.
bitstorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git
The following commit(s) were added to refs/heads/master by this push:
new e9a75dc76a Make the tests of `LastModifiedTest` work on all platforms.
(#1512)
e9a75dc76a is described below
commit e9a75dc76af447e98c2497f4fac1d22a29c4ae49
Author: Johan Stuyts <[email protected]>
AuthorDate: Fri Jul 10 10:47:29 2026 +0200
Make the tests of `LastModifiedTest` work on all platforms. (#1512)
---
.../src/test/java/org/apache/wicket/util/io/LastModifiedTest.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git
a/wicket-util/src/test/java/org/apache/wicket/util/io/LastModifiedTest.java
b/wicket-util/src/test/java/org/apache/wicket/util/io/LastModifiedTest.java
index 55b5df4a28..209a64d619 100644
--- a/wicket-util/src/test/java/org/apache/wicket/util/io/LastModifiedTest.java
+++ b/wicket-util/src/test/java/org/apache/wicket/util/io/LastModifiedTest.java
@@ -21,8 +21,6 @@ import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.File;
import java.io.IOException;
-import java.net.URI;
-import java.net.URL;
import java.time.Instant;
import org.apache.wicket.util.file.Files;
import org.junit.jupiter.api.Test;
@@ -44,7 +42,7 @@ public class LastModifiedTest
{
File file = new File("/does/not/exists/4iorp4opergere.txt");
assertNull(Files.getLastModified(file));
- assertNull(Connections.getLastModified(URI.create("file:" +
file.getAbsolutePath()).toURL()));
+
assertNull(Connections.getLastModified(file.getAbsoluteFile().toURI().toURL()));
}
/**
@@ -86,7 +84,7 @@ public class LastModifiedTest
final Instant expected =
Instant.ofEpochMilli(lm);
assertEquals(expected,
Files.getLastModified(file));
assertEquals(expected,
-
Connections.getLastModified(URI.create("file:" +
file.getAbsolutePath()).toURL()));
+
Connections.getLastModified(file.getAbsoluteFile().toURI().toURL()));
}
}
finally