From 8a48a020dcf8c6e0c091cf9307ea5f09cd9e4064 Mon Sep 17 00:00:00 2001 From: Jonathan Shook Date: Fri, 9 Dec 2022 17:13:46 -0600 Subject: [PATCH] allow zero width ranges --- .../shared/from_long/to_collection/HashedRangeToLongList.java | 2 +- .../tests/long_collections/HashedRangeToLongListTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/virtdata-lib-basics/src/main/java/io/nosqlbench/virtdata/library/basics/shared/from_long/to_collection/HashedRangeToLongList.java b/virtdata-lib-basics/src/main/java/io/nosqlbench/virtdata/library/basics/shared/from_long/to_collection/HashedRangeToLongList.java index 097cb1818..dd760e9c0 100644 --- a/virtdata-lib-basics/src/main/java/io/nosqlbench/virtdata/library/basics/shared/from_long/to_collection/HashedRangeToLongList.java +++ b/virtdata-lib-basics/src/main/java/io/nosqlbench/virtdata/library/basics/shared/from_long/to_collection/HashedRangeToLongList.java @@ -36,7 +36,7 @@ public class HashedRangeToLongList implements LongFunction> { private final HashRange sizeRange; public HashedRangeToLongList(int minVal, int maxVal, int minSize, int maxSize) { - if (minSize>=maxSize || minSize>=maxSize) { + if (minSize>maxSize || minVal>maxVal) { throw new RuntimeException("HashedRangeToLongList must have minval, maxval, minsize, maxsize, where min list= gener.apply(i); assertThat(list.size()).isBetween(9,12); for (Long longVal : list) {