rantav/hector — pull request #446 by jancona (2012-03-30 21:21:02+00:00)
Title: Fix round-tripping of empty String Component in Composite

I have a Composite column family with a component string that may be empty. I notice that when I store a value with an empty string, the value comes back as a null string, rather than being empty (""). The value is serialized as a zero-length ByteBuffer and Cassandra round trips that properly, but AbstractComposite.getValue() specials cases an empty ByteBuffer, rather than letting the serializer handle it. When I removed the special case, ComnpositeTest.testNullValueSerialization() fails, because nulls don't round trip properly. I resolved the issue in my commit by throwing an NPE when a null component is added to a Composite, but another approach might be better.

Thoughts?