maedhroz commented on a change in pull request #1111:
URL: https://github.com/apache/cassandra/pull/1111#discussion_r672613021



##########
File path: src/java/org/apache/cassandra/net/Message.java
##########
@@ -1151,9 +1151,20 @@ private void serializeParams(Map<ParamType, Object> 
params, DataOutputPlus out,
                     : in.readInt();
 
                 if (null != type)
-                    params.put(type, type.serializer.deserialize(in, version));
-                else
+                {
+                    // Have to special case deserializer as pre-4.0 needs 
length to decode correctly
+                    if (version < VERSION_40 && type == ParamType.RESPOND_TO)
+                    {
+                        params.put(type, 
InetAddressAndPort.FwdFrmSerializer.fwdFrmSerializer.pre40DeserializeWithLength(in,
 version, length));
+                    }
+                    else
+                    {
+                        params.put(type, type.serializer.deserialize(in, 
version));
+                    }
+                }
+                else {

Review comment:
       nit: newline




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