aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2024-12-28 23:19:00 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2024-12-29 01:47:24 +0100
commit1b39ee910b8c8f36916468204d126664366e915d (patch)
tree37c33ccd1f4107d5d5c4995254de7048753686d4
parentc990b7921eb0574f2defe7ea0991af16687c4f19 (diff)
downloadjgit-1b39ee910b8c8f36916468204d126664366e915d.tar.gz
jgit-1b39ee910b8c8f36916468204d126664366e915d.zip
GcLog: replace deprecated GitDateParser with GitTimeParser
We are moving from java.util.Date to java.time APIs. Change-Id: I6f99d52c2e5bd4734ac1fe5378eed29b398e8c25
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java
index 8647b3e664..862aaab0ee 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java
@@ -23,8 +23,7 @@ import java.time.Instant;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.lib.ConfigConstants;
import org.eclipse.jgit.util.FileUtils;
-import org.eclipse.jgit.util.GitDateParser;
-import org.eclipse.jgit.util.SystemReader;
+import org.eclipse.jgit.util.GitTimeParser;
/**
* This class manages the gc.log file for a {@link FileRepository}.
@@ -62,8 +61,7 @@ class GcLog {
if (logExpiryStr == null) {
logExpiryStr = LOG_EXPIRY_DEFAULT;
}
- gcLogExpire = GitDateParser.parse(logExpiryStr, null,
- SystemReader.getInstance().getLocale()).toInstant();
+ gcLogExpire = GitTimeParser.parseInstant(logExpiryStr);
}
return gcLogExpire;
}