https://bz.apache.org/bugzilla/show_bug.cgi?id=62330
--- Comment #11 from Jaikiran Pai <jaiki...@apache.org> --- Thank you Stefan for that example. My earlier numerous experiments to get this reproduced on Windows hadn't been productive because I kept assuming "append" to be true in the code at https://github.com/apache/ant/blob/master/src/main/org/apache/tools/ant/util/FileUtils.java#L1856 and tried to replicate that in a simple application. Now that you provided this example, I managed to reproduce this and it turns out to be a bug in Java with Files.newOutputStream(Path) API when the null device is involved in Windows. I've filed https://bugs.openjdk.java.net/browse/JDK-8263898 to track this. While we are at this, there's some useful additional information about null device usage on Windows in this mailing list discussion here https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075386.html, specifically the java.nio.file.Path API won't support the "nul:" (colon construct). -- You are receiving this mail because: You are the assignee for the bug.