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


##########
src/java/org/apache/cassandra/serializers/ListSerializer.java:
##########
@@ -224,10 +226,29 @@ public Class<List<T>> getType()
     }
 
     @Override
-    public ByteBuffer getSerializedValue(ByteBuffer collection, ByteBuffer 
key, AbstractType<?> comparator)
+    public ByteBuffer getSerializedValue(ByteBuffer collection, ByteBuffer 
index, AbstractType<?> comparator)
     {
-        // We don't allow selecting an element of a list, so we don't need 
this.
-        throw new UnsupportedOperationException();
+        try
+        {
+            int n = readCollectionSize(collection, 
ByteBufferAccessor.instance, ProtocolVersion.V3);

Review Comment:
   I just went w/ precedent here and copied the other `getSerializedValue()` 
implementations. Also went with the suggestion of 
`CollectionSerializer#deserialize()`, although why that's "the right thing to 
do" isn't 100% clear to me.



-- 
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