diff options
author | Ivan Frade <ifrade@google.com> | 2024-11-04 15:23:47 -0800 |
---|---|---|
committer | Ivan Frade <ifrade@google.com> | 2024-12-13 13:23:12 -0800 |
commit | 320a95e37d3f791b0d16ff7753bc1d7b68b0681f (patch) | |
tree | f853bb9f777bc933e8f06a5478968d7943ab2d6a /org.eclipse.jgit.pgm.test | |
parent | 9cf0a1f174886f844f61d056d4c3383415d27b9e (diff) | |
download | jgit-320a95e37d3f791b0d16ff7753bc1d7b68b0681f.tar.gz jgit-320a95e37d3f791b0d16ff7753bc1d7b68b0681f.zip |
TestRepository: Deprecate #getDate and use #getInstant instead
Errorprone recomments to use the more modern java.time API instead of
the java.util.Date family of classes.
This removes all uses of TestRepository#getDate and replace them with
getInstant. The method is marked as deprecated and doesn't have any
other usages.
Change-Id: I84ea63abf781d0d3c7c2724891fd2ef7afc2db1d
Diffstat (limited to 'org.eclipse.jgit.pgm.test')
-rw-r--r-- | org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CloneTest.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CloneTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CloneTest.java index a1fb9fb589..c56cc6bf3c 100644 --- a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CloneTest.java +++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/CloneTest.java @@ -126,7 +126,7 @@ public class CloneTest extends CLIRepositoryTestCase { JGitTestUtil.writeTrashFile(db, "Test.txt", "Some change"); git.add().addFilepattern("Test.txt").call(); return git.commit() - .setCommitter(new PersonIdent(this.committer, tr.getDate())) + .setCommitter(new PersonIdent(this.committer, tr.getInstant())) .setMessage("Second commit").call(); } @@ -134,7 +134,7 @@ public class CloneTest extends CLIRepositoryTestCase { JGitTestUtil.writeTrashFile(db, "change.txt", "another change"); git.add().addFilepattern("change.txt").call(); return git.commit() - .setCommitter(new PersonIdent(this.committer, tr.getDate())) + .setCommitter(new PersonIdent(this.committer, tr.getInstant())) .setMessage("Third commit").call(); } |