I'm not able to reproduce this. I've just tested it and binding an empty buffer to a bind marker that is the argument to token() works fine. And as far as I can tell, the native protocol has always allowed to bind empty byte buffers so I'm not sure that has ever be a problem, but if it was, it's fixed now as far as I can tell.
I'll note that the fact that the token of an empty buffer happens to return the minimum token is a bit of an implementation detail of our IPartitioner.getToken() methods. And in particular, with composite partition key you won't really be able to provide a empty byte buffer for the whole partition key, so you will have to use more than a single prepared statement to page in that case.
As for allowing null as argument to token(), I'm not a fan because:
- I don't find token(null) particularly logical/clean.
- This doesn't really transpose well to composite partition key (for which the token() method really expect multiple arguments).
- With the native protocol 2.0 supporting a much simpler way to do paging, I don't see a point in bothering here.