This is an automated email from the ASF dual-hosted git repository. cstamas pushed a commit to branch MSHARED-1213 in repository https://gitbox.apache.org/repos/asf/maven-filtering.git
commit 28303da29bb5a00b53498c16aeca7cee4db9be0e Author: Tamas Cservenak <ta...@cservenak.net> AuthorDate: Mon Mar 20 22:23:31 2023 +0100 UT works --- .../java/org/apache/maven/shared/filtering/FilteringUtilsTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/maven/shared/filtering/FilteringUtilsTest.java b/src/test/java/org/apache/maven/shared/filtering/FilteringUtilsTest.java index da6941f..669dd16 100644 --- a/src/test/java/org/apache/maven/shared/filtering/FilteringUtilsTest.java +++ b/src/test/java/org/apache/maven/shared/filtering/FilteringUtilsTest.java @@ -22,9 +22,7 @@ import java.io.File; import java.io.IOException; import java.io.Reader; import java.nio.charset.StandardCharsets; -import java.nio.file.CopyOption; import java.nio.file.Files; -import java.nio.file.StandardCopyOption; import org.junit.Test; @@ -40,10 +38,10 @@ public class FilteringUtilsTest extends TestSupport { private static File testDirectory = new File(getBasedir(), "target/test-classes/"); @Test - public void testCopy() throws IOException { + public void testMSHARED1213CopyWithTargetAlreadyExisting0ByteFile() throws IOException { File fromFile = new File(getBasedir() + "/src/test/units-files/MSHARED-1213/enunciate.xml"); File toFile = new File(testDirectory, "MSHARED-1213-enunciate.xml"); - Files.copy(fromFile.toPath(), toFile.toPath(), StandardCopyOption.REPLACE_EXISTING); + Files.write(toFile.toPath(), "".getBytes(StandardCharsets.UTF_8)); FilteringUtils.copyFile( fromFile, toFile,