This is an automated email from the ASF dual-hosted git repository. orpiske pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new b7831e34609 cleanups: replaced File#delete with Files#delete b7831e34609 is described below commit b7831e34609f2ad4b6ae4cf163ae7efc4a9209c7 Author: Nikita Konovalov <nkono...@redhat.com> AuthorDate: Wed Oct 18 17:08:34 2023 +0200 cleanups: replaced File#delete with Files#delete --- .../src/main/java/org/apache/camel/test/junit5/TestSupport.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestSupport.java b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestSupport.java index 5d7375f9b94..01be80cdbfc 100644 --- a/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestSupport.java +++ b/components/camel-test/camel-test-junit5/src/main/java/org/apache/camel/test/junit5/TestSupport.java @@ -485,8 +485,9 @@ public final class TestSupport { recursivelyDeleteDirectory(child); } } - boolean success = file.delete(); - if (!success) { + try { + Files.delete(file.toPath()); + } catch (IOException e) { LOG.warn("Deletion of file: {} failed", file.getAbsolutePath()); } }