Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jbellis committed Dec 24, 2012
1 parent 34630f6 commit 6018709
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/java/org/apache/cassandra/db/RowPosition.java
Expand Up @@ -51,7 +51,9 @@ public static RowPositionSerializer serializer()

public static RowPosition forKey(ByteBuffer key, IPartitioner p)
{
return key == null || key.remaining() == 0 ? p.getMinimumToken().minKeyBound() : p.decorateKey(key);
return (key == null || key.remaining() == 0)
? p.getMinimumToken().minKeyBound()
: p.decorateKey(key);
}

public abstract Token getToken();
Expand Down
10 changes: 6 additions & 4 deletions src/java/org/apache/cassandra/thrift/CassandraServer.java
Expand Up @@ -693,8 +693,9 @@ public List<KeySlice> get_range_slices(ColumnParent column_parent, SlicePredicat
}
else
{
RowPosition end = range.end_key == null ? p.getTokenFactory().fromString(range.end_token).maxKeyBound(p)
: RowPosition.forKey(range.end_key, p);
RowPosition end = range.end_key == null
? p.getTokenFactory().fromString(range.end_token).maxKeyBound(p)
: RowPosition.forKey(range.end_key, p);
bounds = new Bounds<RowPosition>(RowPosition.forKey(range.start_key, p), end);
}
schedule(DatabaseDescriptor.getRpcTimeout());
Expand Down Expand Up @@ -748,8 +749,9 @@ public List<KeySlice> get_paged_slice(String column_family, KeyRange range, Byte
}
else
{
RowPosition end = range.end_key == null ? p.getTokenFactory().fromString(range.end_token).maxKeyBound(p)
: RowPosition.forKey(range.end_key, p);
RowPosition end = range.end_key == null
? p.getTokenFactory().fromString(range.end_token).maxKeyBound(p)
: RowPosition.forKey(range.end_key, p);
bounds = new Bounds<RowPosition>(RowPosition.forKey(range.start_key, p), end);
}

Expand Down

0 comments on commit 6018709

Please sign in to comment.