From 5a56be277dac6328c9aec8ada60ab89c9750b1da Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 25 Dec 2024 21:54:48 +0100 Subject: DescribeCommand: use java.time API We are moving away from the old java.util.Date API to the java.time API. Change-Id: I46b1f12192fe40d3bb740c3ce8632fffcd5fc5de --- org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'org.eclipse.jgit/src/org/eclipse') diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java index 805a886392..934245781f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java @@ -15,11 +15,11 @@ import static org.eclipse.jgit.lib.TypedConfigGetter.UNSET_INT; import java.io.IOException; import java.text.MessageFormat; +import java.time.Instant; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; -import java.util.Date; import java.util.List; import java.util.Map; import java.util.Optional; @@ -274,10 +274,10 @@ public class DescribeCommand extends GitCommand { } } - private Date tagDate(Ref tag) throws IOException { + private Instant tagDate(Ref tag) throws IOException { RevTag t = w.parseTag(tag.getObjectId()); w.parseBody(t); - return t.getTaggerIdent().getWhen(); + return t.getTaggerIdent().getWhenAsInstant(); } }; -- cgit v1.2.3