diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2024-04-29 01:37:28 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2024-04-29 15:20:42 +0200 |
commit | 8bc7f38489438251c1cf35eff3a2db1fd0bfa553 (patch) | |
tree | cc98966a4ab397f1804a741a66ddebaf0389287a /org.eclipse.jgit.test | |
parent | 85602eaa98aefefdf023317db02f774a80bfeda4 (diff) | |
download | jgit-8bc7f38489438251c1cf35eff3a2db1fd0bfa553.tar.gz jgit-8bc7f38489438251c1cf35eff3a2db1fd0bfa553.zip |
[errorprone] Fix pattern FutureReturnValueIgnored
See https://errorprone.info/bugpattern/FutureReturnValueIgnored
Change-Id: I7225fd6388ce70ed5eea9e61b29bd10e1a927acb
Diffstat (limited to 'org.eclipse.jgit.test')
3 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java index 9a2935f136..e1b6778c0e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcKeepFilesTest.java @@ -162,7 +162,7 @@ public class GcKeepFilesTest extends GcTestCase { private void testKeptObjectsAreIncluded() throws Exception { BranchBuilder bb = tr.branch("refs/heads/master"); ObjectId commitObjectInLockedPack = bb.commit().create().toObjectId(); - gc.gc(); + gc.gc().get(); stats = gc.getStatistics(); assertEquals(COMMIT_AND_TREE_OBJECTS, stats.numberOfPackedObjects); assertEquals(1, stats.numberOfPackFiles); @@ -170,7 +170,7 @@ public class GcKeepFilesTest extends GcTestCase { .createNewFile()); bb.commit().create(); - gc.gc(); + gc.gc().get(); stats = gc.getStatistics(); assertEquals(2 * COMMIT_AND_TREE_OBJECTS + 1, stats.numberOfPackedObjects); @@ -194,7 +194,7 @@ public class GcKeepFilesTest extends GcTestCase { private void testKeptObjectsAreNotIncluded() throws Exception { BranchBuilder bb = tr.branch("refs/heads/master"); ObjectId commitObjectInLockedPack = bb.commit().create().toObjectId(); - gc.gc(); + gc.gc().get(); stats = gc.getStatistics(); assertEquals(COMMIT_AND_TREE_OBJECTS, stats.numberOfPackedObjects); assertEquals(1, stats.numberOfPackFiles); @@ -202,7 +202,7 @@ public class GcKeepFilesTest extends GcTestCase { .createNewFile()); bb.commit().create(); - gc.gc(); + gc.gc().get(); stats = gc.getStatistics(); assertEquals(COMMIT_AND_TREE_OBJECTS + 1, stats.numberOfPackedObjects); assertEquals(2, stats.numberOfPackFiles); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java index 0c09ad1510..ecf9a15b03 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/pack/GcCommitSelectionTest.java @@ -110,7 +110,7 @@ public class GcCommitSelectionTest extends GcTestCase { tr.branch(mainBranch).update(commit1); gc.setExpireAgeMillis(0); - gc.gc(); + gc.gc().get(); // Create only 2 bitmaps, for commit0 and commit1, excluding commit2 assertEquals(2, gc.getStatistics().numberOfBitmaps); @@ -227,7 +227,7 @@ public class GcCommitSelectionTest extends GcTestCase { PackConfig packConfig = new PackConfig(); packConfig.setBitmapExcludedRefsPrefixes(new String[] { "refs/heads/other" }); gc.setPackConfig(packConfig); - gc.gc(); + gc.gc().get(); assertEquals(1, gc.getStatistics().numberOfBitmaps); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackHandleDeletedPackFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackHandleDeletedPackFileTest.java index 118eb984d0..097b84974f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackHandleDeletedPackFileTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackHandleDeletedPackFileTest.java @@ -102,7 +102,7 @@ public class UploadPackHandleDeletedPackFileTest try { addNewCommit(); - new GC(remote.getRepository()).gc(); + new GC(remote.getRepository()).gc().get(); pack.getPackFile().create(packExt).delete(); } catch (Exception e) { @@ -136,7 +136,7 @@ public class UploadPackHandleDeletedPackFileTest .create(); remote.update("master", commit0); - new GC(remote.getRepository()).gc(); // create pack files + new GC(remote.getRepository()).gc().get(); // create pack files head = remote.commit().message("1").parent(commit0) .add("test1.txt", remote.blob("1")) |