You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by re...@apache.org on 2025/01/27 10:35:18 UTC

(jackrabbit-oak) branch trunk updated: OAK-11420: Remove usage of Guava Files.move() - changes undone

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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new 7efcf23c76 OAK-11420: Remove usage of Guava Files.move() - changes undone
7efcf23c76 is described below

commit 7efcf23c76e10d013d12d7330630ee28a745225a
Author: Julian Reschke <re...@apache.org>
AuthorDate: Mon Jan 27 11:35:05 2025 +0100

    OAK-11420: Remove usage of Guava Files.move() - changes undone
---
 .../apache/jackrabbit/oak/plugins/blob/datastore/BlobIdTracker.java   | 2 +-
 .../src/main/java/org/apache/jackrabbit/oak/commons/FileIOUtils.java  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/BlobIdTracker.java b/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/BlobIdTracker.java
index 06df3ba1d7..ae8af05010 100644
--- a/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/BlobIdTracker.java
+++ b/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/datastore/BlobIdTracker.java
@@ -449,7 +449,7 @@ public class BlobIdTracker implements Closeable, BlobTracker {
                     }
                 }
 
-                Files.move(removed.toPath(), delFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+                org.apache.jackrabbit.guava.common.io.Files.move(removed, delFile);
                 LOG.trace("removed active delete records");
             } finally {
                 lock.unlock();
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 7f289768bc..99c51ea460 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
@@ -74,7 +74,7 @@ public final class FileIOUtils {
     public static void sort(File file) throws IOException {
         File sorted = createTempFile("fleioutilssort", null);
         merge(sortInBatch(file, lexComparator, true), sorted);
-        Files.move(sorted.toPath(), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
+        org.apache.jackrabbit.guava.common.io.Files.move(sorted, file);
     }
 
     /**
@@ -87,7 +87,7 @@ public final class FileIOUtils {
     public static void sort(File file, Comparator<String> comparator) throws IOException {
         File sorted = createTempFile("fleioutilssort", null);
         merge(sortInBatch(file, comparator, true), sorted, comparator);
-        Files.move(sorted.toPath(), file.toPath(), StandardCopyOption.REPLACE_EXISTING);
+        org.apache.jackrabbit.guava.common.io.Files.move(sorted, file);
     }
 
     /**