From: Matthias Sohn Date: Fri, 30 Aug 2024 15:17:29 +0000 (+0200) Subject: Remove deprecated FileSnapshot.save(long) method X-Git-Tag: v7.0.0.202409031743-r~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ec97acb808f0685ca3e09389301bf1d3c606f607;p=jgit.git Remove deprecated FileSnapshot.save(long) method Change-Id: I9b77142127cc96ee6658e85a6cf0586d941c5c0c --- diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java index 8701a1291b..c4fa3eeb99 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java @@ -125,29 +125,6 @@ public class FileSnapshot { return fileKey == null ? MISSING_FILEKEY : fileKey; } - /** - * Record a snapshot for a file for which the last modification time is - * already known. - *

- * This method should be invoked before the file is accessed. - *

- * Note that this method cannot rely on measuring file timestamp resolution - * to avoid racy git issues caused by finite file timestamp resolution since - * it's unknown in which filesystem the file is located. Hence the worst - * case fallback for timestamp resolution is used. - * - * @param modified - * the last modification time of the file - * @return the snapshot. - * @deprecated use {@link #save(Instant)} instead. - */ - @Deprecated - public static FileSnapshot save(long modified) { - final Instant read = Instant.now(); - return new FileSnapshot(read, Instant.ofEpochMilli(modified), - UNKNOWN_SIZE, FALLBACK_TIMESTAMP_RESOLUTION, MISSING_FILEKEY); - } - /** * Record a snapshot for a file for which the last modification time is * already known.