maksaska commented on code in PR #12200:
URL: https://github.com/apache/ignite/pull/12200#discussion_r2245056467


##########
modules/codegen2/src/main/java/org/apache/ignite/internal/MessageSerializerGenerator.java:
##########
@@ -353,6 +353,20 @@ else if (sameType(type, 
"org.apache.ignite.internal.processors.affinity.Affinity
             else if (assignableFrom(type, type(MESSAGE_INTERFACE)))
                 returnFalseIfWriteFailed(write, "writer.writeMessage", 
getExpr);
 
+            else if (assignableFrom(erasedType(type), 
erasedType(Collection.class))) {
+                if (assignableFrom(erasedType(type), erasedType(Set.class)))

Review Comment:
   This is a precaution for other developers who might try to use a Set for the 
Message field. On the receiver side, we currently cast Collection field to an 
ArrayList, which would cause a ClassCastException if a Set is used. See 
DirectByteBuffer#readCollection() for details.



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to