From f1a4afe37ac95b76a6fda5d86e330f633f681579 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 30 Aug 2024 17:10:33 +0200 Subject: [PATCH] DirCacheEntry: remove deprecated methods - boolean mightBeRacilyClean(int, int) - long getLastModified() - void setLastModified(long) Change-Id: I428fbb2109e13e80b8655622531c10e55a922a6f --- .../eclipse/jgit/dircache/DirCacheEntry.java | 50 ------------------- 1 file changed, 50 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java index c5e1e4e765..5a22938694 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java @@ -386,28 +386,6 @@ public class DirCacheEntry { } } - /** - * Is it possible for this entry to be accidentally assumed clean? - *

- * The "racy git" problem happens when a work file can be updated faster - * than the filesystem records file modification timestamps. It is possible - * for an application to edit a work file, update the index, then edit it - * again before the filesystem will give the work file a new modification - * timestamp. This method tests to see if file was written out at the same - * time as the index. - * - * @param smudge_s - * seconds component of the index's last modified time. - * @param smudge_ns - * nanoseconds component of the index's last modified time. - * @return true if extra careful checks should be used. - * @deprecated use {@link #mightBeRacilyClean(Instant)} instead - */ - @Deprecated - public final boolean mightBeRacilyClean(int smudge_s, int smudge_ns) { - return mightBeRacilyClean(Instant.ofEpochSecond(smudge_s, smudge_ns)); - } - /** * Is it possible for this entry to be accidentally assumed clean? *

@@ -652,22 +630,6 @@ public class DirCacheEntry { encodeTS(P_CTIME, when); } - /** - * Get the cached last modification date of this file, in milliseconds. - *

- * One of the indicators that the file has been modified by an application - * changing the working tree is if the last modification time for the file - * differs from the time stored in this entry. - * - * @return last modification time of this file, in milliseconds since the - * Java epoch (midnight Jan 1, 1970 UTC). - * @deprecated use {@link #getLastModifiedInstant()} instead - */ - @Deprecated - public long getLastModified() { - return decodeTS(P_MTIME); - } - /** * Get the cached last modification date of this file. *

@@ -682,18 +644,6 @@ public class DirCacheEntry { return decodeTSInstant(P_MTIME); } - /** - * Set the cached last modification date of this file, using milliseconds. - * - * @param when - * new cached modification date of the file, in milliseconds. - * @deprecated use {@link #setLastModified(Instant)} instead - */ - @Deprecated - public void setLastModified(long when) { - encodeTS(P_MTIME, when); - } - /** * Set the cached last modification date of this file. * -- 2.39.5