diff options
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/util/BlockListTest.java | 2 | ||||
-rw-r--r-- | org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefMapTest.java | 2 | ||||
-rw-r--r-- | tools/BUILD | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/BlockListTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/BlockListTest.java index a270ca8861..b8b9cbe558 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/BlockListTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/BlockListTest.java @@ -296,6 +296,7 @@ public class BlockListTest { public void testAddRejectsBadIndexes() { BlockList<Integer> list = new BlockList<>(4); list.add(Integer.valueOf(41)); + assertEquals(Integer.valueOf(41), list.get(0)); try { list.add(-1, Integer.valueOf(42)); @@ -316,6 +317,7 @@ public class BlockListTest { public void testRemoveRejectsBadIndexes() { BlockList<Integer> list = new BlockList<>(4); list.add(Integer.valueOf(41)); + assertEquals(Integer.valueOf(41), list.get(0)); try { list.remove(-1); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefMapTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefMapTest.java index 627417d462..a8077fdb0c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefMapTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefMapTest.java @@ -268,6 +268,7 @@ public class RefMapTest { assertFalse(itr.hasNext()); } + @SuppressWarnings("ModifiedButNotUsed") @Test public void testPut_KeyMustMatchName_NoPrefix() { final Ref refA = newRef("refs/heads/A", ID_ONE); @@ -280,6 +281,7 @@ public class RefMapTest { } } + @SuppressWarnings("ModifiedButNotUsed") @Test public void testPut_KeyMustMatchName_WithPrefix() { final Ref refA = newRef("refs/heads/A", ID_ONE); diff --git a/tools/BUILD b/tools/BUILD index 17ff5afb5d..2ad281e64a 100644 --- a/tools/BUILD +++ b/tools/BUILD @@ -270,7 +270,7 @@ java_package_configuration( "-Xep:MixedDescriptors:ERROR", "-Xep:MixedMutabilityReturnType:WARN", "-Xep:MockitoUsage:ERROR", - "-Xep:ModifiedButNotUsed:WARN", + "-Xep:ModifiedButNotUsed:ERROR", "-Xep:ModifyCollectionInEnhancedForLoop:ERROR", "-Xep:ModifyingCollectionWithItself:ERROR", "-Xep:ModifySourceCollectionInStream:ERROR", |