]> source.dussan.org Git - jgit.git/commitdiff
Remove deprecated FileSnapshot.save(long) method 52/1200252/3
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 30 Aug 2024 15:17:29 +0000 (17:17 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 3 Sep 2024 14:11:03 +0000 (16:11 +0200)
Change-Id: I9b77142127cc96ee6658e85a6cf0586d941c5c0c

org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java

index 8701a1291b1d374ec568d85162ebfc56471903a5..c4fa3eeb99849069ae44c5535069db829072f516 100644 (file)
@@ -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.
-        * <p>
-        * This method should be invoked before the file is accessed.
-        * <p>
-        * 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.