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


##########
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))) {

Review Comment:
   Why do we need erase Collection type?



##########
modules/codegen2/src/main/java/org/apache/ignite/internal/MessageSerializerGenerator.java:
##########
@@ -488,6 +514,9 @@ private String messageCollectionItemType(TypeMirror type) 
throws Exception {
         }
 
         if (type.getKind() == TypeKind.DECLARED) {
+            if (sameType(type, Integer.class))

Review Comment:
   Use env.getTypeUtils().unboxedType() in the end of the if-chain. If not 
unboxed - then should fail



##########
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:
   Why do we fail on Set?



##########
modules/core/src/test/resources/codegen/TestMessage.java:
##########
@@ -65,6 +67,15 @@ public class TestMessage implements Message {
     @Order(value = 11, method = "overridenFieldMethod")
     private String field;
 
+    @Order(12)
+    private List<GridCacheVersion> versions;
+
+    @Order(13)
+    private List<Integer> boxedIntValues;

Review Comment:
   Let's add a new test message class with all possible combinations of 
Collections (List/Set) and types (boxed primitive, Message)



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