This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 32a6a558d and another case of invoking "ln"
32a6a558d is described below
commit 32a6a558d711ebfcfbffb811a766976c72210a98
Author: Stefan Bodewig <[email protected]>
AuthorDate: Sun Feb 8 09:48:57 2026 +0100
and another case of invoking "ln"
---
src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java
b/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java
index f16c52f9b..8ed8373b2 100644
--- a/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java
+++ b/src/tests/junit/org/apache/tools/ant/DirectoryScannerTest.java
@@ -29,6 +29,7 @@ import static org.junit.Assume.assumeTrue;
import java.io.File;
import java.io.IOException;
+import java.nio.file.Files;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
@@ -236,10 +237,7 @@ public class DirectoryScannerTest {
assertTrue("target does not exist pre-test", targetFile.exists());
try {
- // add conditions and more commands as soon as the need arises
- String[] command = new String[] {"ln", "-s",
targetFile.getAbsolutePath(), linkFile.getAbsolutePath()};
- Process process = Runtime.getRuntime().exec(command);
- assertEquals("0 return code expected for external process", 0,
process.waitFor());
+ Files.createSymbolicLink(linkFile.toPath(),
targetFile.toPath());
// followSymlinks should be true by default, but if this ever
// changes we will need this line.