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 a5334ff49 Use FileUtils.current()
a5334ff49 is described below
commit a5334ff491e78d0d79a9808895e91504b001fc45
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Nov 8 08:14:32 2025 -0500
Use FileUtils.current()
- Using File("") can yield unexpected results
- See https://bugs.openjdk.org/browse/JDK-8024695
---
.../org/apache/commons/configuration2/io/TestDefaultFileSystem.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/src/test/java/org/apache/commons/configuration2/io/TestDefaultFileSystem.java
b/src/test/java/org/apache/commons/configuration2/io/TestDefaultFileSystem.java
index 33613f60b..39bb14c13 100644
---
a/src/test/java/org/apache/commons/configuration2/io/TestDefaultFileSystem.java
+++
b/src/test/java/org/apache/commons/configuration2/io/TestDefaultFileSystem.java
@@ -23,6 +23,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
import java.io.File;
import org.apache.commons.configuration2.ex.ConfigurationException;
+import org.apache.commons.io.FileUtils;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -52,7 +53,7 @@ public class TestDefaultFileSystem {
*/
@Test
void testGetOutputStreamInvalidPath() {
- final File file = new File("");
+ final File file = FileUtils.current();
assertThrows(ConfigurationException.class, () ->
fileSystem.getOutputStream(file));
}