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-cli.git

commit e0f97af44fe56dc99dfcf80f1c0a727c7d0e149b
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Nov 8 08:13:40 2025 -0500

    Use FileUtils.current()
    
    - Using File("") can yield unexpected results
    - See https://bugs.openjdk.org/browse/JDK-8024695
---
 src/test/java/org/apache/commons/cli/TypeHandlerTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/cli/TypeHandlerTest.java 
b/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
index 39cfdf89..98745073 100644
--- a/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
+++ b/src/test/java/org/apache/commons/cli/TypeHandlerTest.java
@@ -41,6 +41,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.Stream;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -184,7 +185,7 @@ class TypeHandlerTest {
 
     @Test
     void testCreateFile() {
-        final File file = new File("").getAbsoluteFile();
+        final File file = FileUtils.current().getAbsoluteFile();
         assertEquals(file, TypeHandler.createFile(file.toString()));
     }
 

Reply via email to