Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

avoid astyanax null pointer exceptions

  • Loading branch information...
commit cea429beb85016ad5d12b86d4e0ed784d2dc6870 1 parent 133e524
Dean Hiller authored
View
9 src/main/java/com/alvazan/orm/layer9z/spi/db/cassandra/CassandraSession.java
@@ -307,7 +307,14 @@ public void clearImpl() throws ConnectionException {
@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();
Please sign in to comment.
Something went wrong with that request. Please try again.