Use if-else

This commit is contained in:
Gary Gregory 2024-06-23 14:18:47 -04:00
parent c40ad3a39d
commit 7e152d4935
1 changed files with 2 additions and 4 deletions

View File

@ -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));
}
}