Skip to content

Commit dd14dd4

Browse files
committed
make implicit throw explicit for readability
1 parent cdd8fbe commit dd14dd4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quickcheck/src/main/java/fj/test/Arbitrary.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@ public static <K, V> Arbitrary<fj.data.TreeMap<K, V>> arbTreeMap(Ord<K> ord, Arb
981981
public static <K, V> Arbitrary<fj.data.TreeMap<K, V>> arbTreeMap(Ord<K> ord, Arbitrary<K> ak, Arbitrary<V> av, Arbitrary<Integer> ai) {
982982
Gen<List<P2<K, V>>> gl2 = ai.gen.bind(i -> {
983983
if (i < 0) {
984-
Bottom.error("Undefined: arbitrary natural is negative (" + i + ")");
984+
throw Bottom.error("Undefined: arbitrary natural is negative (" + i + ")");
985985
}
986986
return Gen.sequenceN(Math.max(i, 0), arbP2(ak, av).gen);
987987
});
@@ -993,7 +993,7 @@ public static <K, V> Arbitrary<fj.data.TreeMap<K, V>> arbTreeMap(Ord<K> ord, Arb
993993
*/
994994
public static <K, V> Arbitrary<fj.data.TreeMap<K, V>> arbTreeMap(Ord<K> ord, Arbitrary<K> ak, Arbitrary<V> av, int maxSize) {
995995
if (maxSize < 0) {
996-
Bottom.error("Undefined: arbitrary natural is negative (" + maxSize + ")");
996+
throw Bottom.error("Undefined: arbitrary natural is negative (" + maxSize + ")");
997997
}
998998
return arbTreeMap(ord, ak, av, arbitrary(choose(0, maxSize)));
999999
}

0 commit comments

Comments
 (0)