Don't force developers to wrap byte[] with ByteBuffer...

60 views
Skip to first unread message

Kevin Burton

unread,
Jun 9, 2014, 6:23:32 PM6/9/14
to java-dri...@lists.datastax.com
I have a Set<byte[]> that I need to send via CQL.

But I'm getting:

java.lang.IllegalArgumentException: Invalid value [B@ca9890e of type unknown to the query builder (for blob values, make sure to use a ByteBuffer)

... Why am I forced do this?  The driver could do this automatically for me.

It's pretty clear what I'm trying to send.

So now, in order to send this, I have to re-wrap it in another Set and wrap everything in a ByteBuffer. Doing this with another HashSet or TreeSet isn't free... 

The driver could just do it for me.

Rick Bullotta

unread,
Jun 9, 2014, 7:51:33 PM6/9/14
to java-dri...@lists.datastax.com

It's certainly OK to criticize other peoples work, but there's a good way and a not-so-good way. And in the world of open source, you're free to also suggest and contribute a solution. 

Just sayin. 



To unsubscribe from this group and stop receiving emails from it, send an email to java-driver-us...@lists.datastax.com.

Kevin Burton

unread,
Jun 9, 2014, 8:29:05 PM6/9/14
to java-dri...@lists.datastax.com
Oh... completely agree.  And I love that book.

I think this is just a classic case of email coming across harsh... 

I didn't intend it that way :)

I was trying to give constructive criticism.  So if it came across harsh then mea culpa.

I wish there were an easier way to do this via email but sometimes you imply things that weren't meant.

I just noticed, this problem, and dashed off a quick email to help you guys out.  Didn't intend anything negative!

Onward! 

Keith Freeman

unread,
Jun 10, 2014, 9:36:34 AM6/10/14
to java-dri...@lists.datastax.com
Reply all
Reply to author
Forward
0 new messages