This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-collections.git
commit 7e152d493534617ee7e76ae2b587243102a7be84 Author: Gary Gregory <[email protected]> AuthorDate: Sun Jun 23 14:18:47 2024 -0400 Use if-else --- .../org/apache/commons/collections4/map/AbstractOrderedMapTest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/test/java/org/apache/commons/collections4/map/AbstractOrderedMapTest.java b/src/test/java/org/apache/commons/collections4/map/AbstractOrderedMapTest.java index 62bc5346c..9caf0c4fc 100644 --- a/src/test/java/org/apache/commons/collections4/map/AbstractOrderedMapTest.java +++ b/src/test/java/org/apache/commons/collections4/map/AbstractOrderedMapTest.java @@ -240,10 +240,8 @@ public abstract class AbstractOrderedMapTest<K, V> extends AbstractIterableMapTe if (!isAllowNullKey()) { final OrderedMap<K, V> finalOrdered = ordered; assertThrows(NullPointerException.class, () -> finalOrdered.previousKey(null)); - } else { - if (!isAllowNullKey()) { - assertNull(ordered.previousKey(null)); - } + } else if (!isAllowNullKey()) { + assertNull(ordered.previousKey(null)); } }
