From 0947834ac950fb4dd59b719cbdddc1726e68674b Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Thu, 11 Jan 2007 23:19:44 +0000 Subject: Fixes for bugs found using FindBugs. --- src/main/java/com/amazon/carbonado/raw/RawCursor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/amazon/carbonado/raw') 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 extends AbstractCursor { 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