From cda8ffdbb4600410451ea8e100f7f6cd4ab8b3f3 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 20 Sep 2023 14:41:54 +0200 Subject: [PATCH] [errorprone] DirCacheEntry: suppress JavaInstantGetSecondsGetNano We get the seconds in the line before we access nanos. See https://errorprone.info/bugpattern/JavaInstantGetSecondsGetNano Change-Id: If79690378d5b31d76b06d26e07434d3dff8c92fb --- .../src/org/eclipse/jgit/dircache/DirCacheEntry.java | 1 + 1 file changed, 1 insertion(+) 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 67edf50f44..e3c5a881d5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java @@ -423,6 +423,7 @@ public class DirCacheEntry { * @return true if extra careful checks should be used. * @since 5.1.9 */ + @SuppressWarnings("JavaInstantGetSecondsGetNano") public final boolean mightBeRacilyClean(Instant smudge) { // If the index has a modification time then it came from disk // and was not generated from scratch in memory. In such cases -- 2.39.5