maedhroz commented on code in PR #2312:
URL: https://github.com/apache/cassandra/pull/2312#discussion_r1187699158


##########
src/java/org/apache/cassandra/serializers/ListSerializer.java:
##########
@@ -104,6 +106,8 @@ public <V> List<T> deserializeForNativeProtocol(V input, 
ValueAccessor<V> access
             {
                 // We can have nulls in lists that are used for IN values
                 V databb = readValue(input, accessor, offset, version);
+                if (databb == null)
+                    throw new MarshalException("Not enough bytes to read value 
in list");
                 offset += sizeOfValue(databb, accessor, version);
                 if (databb != null)

Review Comment:
   For sets and maps, I would almost have a separate `readNonNullValue()` that 
does throw internally.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to