summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/raw
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/amazon/carbonado/raw')
-rw-r--r--src/main/java/com/amazon/carbonado/raw/RawCursor.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/amazon/carbonado/raw/RawCursor.java b/src/main/java/com/amazon/carbonado/raw/RawCursor.java
index 865cdb2..7962c45 100644
--- a/src/main/java/com/amazon/carbonado/raw/RawCursor.java
+++ b/src/main/java/com/amazon/carbonado/raw/RawCursor.java
@@ -82,7 +82,9 @@ public abstract class RawCursor<S> extends AbstractCursor<S> {
if (maxPrefix <= 0 || startBound == null && endBound == null) {
mPrefixLength = 0;
} else {
- int len = Math.min(maxPrefix, Math.min(startBound.length, endBound.length));
+ int len = Math.min(maxPrefix,
+ Math.min(startBound == null ? 0 : startBound.length,
+ endBound == null ? 0 : endBound.length));
int i;
for (i=0; i<len; i++) {
if (startBound[i] != endBound[i]) {