This is an automated email from the ASF dual-hosted git repository.

reschke pushed a commit to branch OAK-11420
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git

commit 80af99b1979204635594f0fd99c91409aa8ca219
Author: Julian Reschke <[email protected]>
AuthorDate: Wed Jan 29 13:36:27 2025 +0100

    OAK-11420: Remove usage of Guava Files.move()
---
 .../main/java/org/apache/jackrabbit/oak/commons/FileIOUtils.java  | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git 
a/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/FileIOUtils.java 
b/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/FileIOUtils.java
index 99c51ea460..b4a9e6a3c0 100644
--- 
a/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/FileIOUtils.java
+++ 
b/oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/FileIOUtils.java
@@ -72,9 +72,7 @@ public final class FileIOUtils {
      * @param file file whose contents needs to be sorted
      */
     public static void sort(File file) throws IOException {
-        File sorted = createTempFile("fleioutilssort", null);
-        merge(sortInBatch(file, lexComparator, true), sorted);
-        org.apache.jackrabbit.guava.common.io.Files.move(sorted, file);
+        sort(file, lexComparator);
     }
 
     /**
@@ -85,9 +83,9 @@ public final class FileIOUtils {
      * @throws IOException
      */
     public static void sort(File file, Comparator<String> comparator) throws 
IOException {
-        File sorted = createTempFile("fleioutilssort", null);
+        File sorted = createTempFile("file-io-utils-sort-", null);
         merge(sortInBatch(file, comparator, true), sorted, comparator);
-        org.apache.jackrabbit.guava.common.io.Files.move(sorted, file);
+        Files.move(sorted.toPath(), file.toPath(), 
StandardCopyOption.REPLACE_EXISTING);
     }
 
     /**

Reply via email to