Skip to content

Commit

Permalink
avoid astyanax null pointer exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dean Hiller committed Sep 11, 2013
1 parent 133e524 commit cea429b
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,14 @@ public RowQuery<byte[], byte[]> createRowQuery() {

@Override
public RowQuery<byte[], byte[]> createRowQueryReverse() {
RangeBuilder rangeBldr = new RangeBuilder().setStart(to).setEnd(from).setReversed(true);
RangeBuilder rangeBldr = new RangeBuilder();
if(to != null)
rangeBldr.setStart(to);
if(from != null)
rangeBldr.setEnd(from);

rangeBldr.setReversed(true);

if(batchSize != null)
rangeBldr = rangeBldr.setLimit(batchSize);
ByteBufferRange range = rangeBldr.build();
Expand Down

0 comments on commit cea429b

Please sign in to comment.