summaryrefslogtreecommitdiff
path: root/src/main/java/com/amazon/carbonado/raw
diff options
context:
space:
mode:
authorBrian S. O'Neill <bronee@gmail.com>2007-01-11 23:19:44 +0000
committerBrian S. O'Neill <bronee@gmail.com>2007-01-11 23:19:44 +0000
commit0947834ac950fb4dd59b719cbdddc1726e68674b (patch)
treedbd0be38df31a000ee178a60dac3557de0f1ad58 /src/main/java/com/amazon/carbonado/raw
parent1ce80a9798cc52b12074fcdf1acf32b0fdfe0569 (diff)
Fixes for bugs found using FindBugs.
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]) {