Skip to content

Commit 7089ad7

Browse files
committed
RUBY-220 - Plumbing to support custom types: serializing and deserializing custom domain objects defined by the client.
* Fixed bug where null values for custom type columns weren't handled properly.
1 parent 000d54b commit 7089ad7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cassandra/protocol/coder.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ def read_custom(buffer, type, custom_type_handlers)
782782
raise Errors::DecodingError, %(Unsupported custom column type: #{type.name})
783783
end
784784
num_bytes = read_size(buffer)
785-
custom_type_handlers[type].deserialize(buffer.read(num_bytes)) if num_bytes > 0
785+
custom_type_handlers[type].deserialize(buffer.read(num_bytes)) if num_bytes && num_bytes > 0
786786
end
787787

788788
def read_decimal(buffer)

0 commit comments

Comments
 (0)