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/29 14:53:41 UTC
(jackrabbit-oak) branch OAK-11440 created (now c04de99552)
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a change to branch OAK-11440
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
at c04de99552 OAK-11440: Remove usage of Guava Files.touch()
This branch includes the following new commits:
new c04de99552 OAK-11440: Remove usage of Guava Files.touch()
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(jackrabbit-oak) 01/01: OAK-11440: Remove usage of Guava Files.touch()
Posted by re...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
reschke pushed a commit to branch OAK-11440
in repository https://gitbox.apache.org/repos/asf/jackrabbit-oak.git
commit c04de99552f4ab73fe51539cb3238a0b74bd505e
Author: Julian Reschke <re...@apache.org>
AuthorDate: Wed Jan 29 15:53:24 2025 +0100
OAK-11440: Remove usage of Guava Files.touch()
---
.../org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java b/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java
index 4b7a57dc16..cb644e2527 100644
--- a/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java
+++ b/oak-blob-plugins/src/main/java/org/apache/jackrabbit/oak/plugins/blob/UploadStagingCache.java
@@ -22,7 +22,9 @@ import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.io.UncheckedIOException;
+import java.nio.file.Files;
import java.nio.file.Path;
+import java.nio.file.attribute.FileTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
@@ -40,7 +42,6 @@ import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.jackrabbit.guava.common.cache.Weigher;
-import org.apache.jackrabbit.guava.common.io.Files;
import org.apache.jackrabbit.guava.common.util.concurrent.FutureCallback;
import org.apache.jackrabbit.guava.common.util.concurrent.Futures;
import org.apache.jackrabbit.guava.common.util.concurrent.ListenableFuture;
@@ -384,7 +385,7 @@ public class UploadStagingCache implements Closeable {
// Add the uploaded file to the download cache if available
if (downloadCache != null) {
// Touch the file to update timestamp and record length
- Files.touch(upload);
+ Files.setLastModifiedTime(upload.toPath(), FileTime.fromMillis(System.currentTimeMillis()));
downloadCache.put(id, upload);
LOG.debug("[{}] added to cache", id);