Merge branch 'cassandra-2.2' into trunk

This commit is contained in:
Sam Tunnicliffe 2015-07-06 15:12:16 +01:00
commit 25308682d9
2 changed files with 7 additions and 2 deletions

View File

@ -49,6 +49,7 @@ Merged from 2.1:
* Fix memory leak in Ref due to ConcurrentLinkedQueue.remove() behaviour (CASSANDRA-9549)
* Make rebuild only run one at a time (CASSANDRA-9119)
Merged from 2.0:
* Avoid NPE in AuthSuccess#decode (CASSANDRA-9727)
* Add listen_address to system.local (CASSANDRA-9603)
* Bug fixes to resultset metadata construction (CASSANDRA-9636)
* Fix setting 'durable_writes' in ALTER KEYSPACE (CASSANDRA-9560)

View File

@ -36,8 +36,12 @@ public class AuthSuccess extends Message.Response
public AuthSuccess decode(ByteBuf body, int version)
{
ByteBuffer b = CBUtil.readValue(body);
byte[] token = new byte[b.remaining()];
b.get(token);
byte[] token = null;
if (b != null)
{
token = new byte[b.remaining()];
b.get(token);
}
return new AuthSuccess(token);
}