This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch 1520 in repository https://gitbox.apache.org/repos/asf/maven-resolver.git
commit 3f550b9af3c2f388715cea3cd4785da1bd003219 Author: Elliotte Rusty Harold <[email protected]> AuthorDate: Thu Sep 11 07:32:15 2025 -0400 Deprecate methods that are completely unused or not used outside this class --- .../eclipse/aether/internal/test/util/TestFileUtils.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileUtils.java b/maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileUtils.java index 793b651a8..e4342e173 100644 --- a/maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileUtils.java +++ b/maven-resolver-test-util/src/main/java/org/eclipse/aether/internal/test/util/TestFileUtils.java @@ -55,6 +55,7 @@ public class TestFileUtils { // hide constructor } + @Deprecated public static void deleteTempFiles() throws IOException { deleteFile(TMP); } @@ -95,6 +96,7 @@ public class TestFileUtils { return false; } + @Deprecated public static boolean mkdirs(File directory) { if (directory == null) { return false; @@ -118,10 +120,20 @@ public class TestFileUtils { return (parentDir != null && (mkdirs(parentDir) || parentDir.exists()) && canonDir.mkdir()); } + @Deprecated + /** + * @throws IOException if an I/O error occurs + * @deprecated use @TempDir (JUnit 5} Or TemporaryFolder (JUnit 4) instead + */ public static File createTempFile(String contents) throws IOException { return createTempFile(contents.getBytes(StandardCharsets.UTF_8), 1); } + @Deprecated + /** + * @throws IOException if an I/O error occurs + * @deprecated use @TempDir (JUnit 5} Or TemporaryFolder (JUnit 4) instead + */ public static File createTempFile(byte[] pattern, int repeat) throws IOException { mkdirs(TMP); File tmpFile = File.createTempFile("tmpfile-", ".data", TMP); @@ -235,6 +247,7 @@ public class TestFileUtils { } } + @Deprecated public static void writeBytes(File file, byte[] pattern, int repeat) throws IOException { file.deleteOnExit(); file.getParentFile().mkdirs(); @@ -262,10 +275,12 @@ public class TestFileUtils { return new String(content, StandardCharsets.UTF_8); } + @Deprecated public static void writeString(File file, String content) throws IOException { writeBytes(file, content.getBytes(StandardCharsets.UTF_8), 1); } + @Deprecated public static void writeString(File file, String content, long timestamp) throws IOException { writeBytes(file, content.getBytes(StandardCharsets.UTF_8), 1); file.setLastModified(timestamp);
