chaokunyang commented on code in PR #2218:
URL: https://github.com/apache/fury/pull/2218#discussion_r2084042048


##########
java/fury-core/src/main/java/org/apache/fury/serializer/ArraySerializers.java:
##########
@@ -208,6 +251,30 @@ private Object[] newArray(int numElements) {
       }
       return value;
     }
+
+    private GenericType buildCollectionGenericType(int dimensions) {

Review Comment:
   It's like:
   ```java
   
    Tuple2<Class<?>, Integer> info = 
TypeUtils.getArrayComponentInfo(declaredClass);
         List<TypeRef<?>> typeRefs = new ArrayList<>(info.f1 + 1);
         typeRefs.add(collectionTypeRef);
         for (int i = 0; i < info.f1; i++) {
           typeRefs.add(TypeUtils.getElementType(typeRefs.get(i)));
         }
         Collections.reverse(typeRefs);
         for (int i = 1; i < typeRefs.size(); i++) {
           TypeRef<?> arrayType = typeRefs.get(i - 1);
           TypeRef<?> typeRef =
               TypeRef.of(
                   Array.newInstance(arrayType.getRawType(), 1).getClass(),
                   typeRefs.get(i).getExtInfo());
           typeRefs.set(i, typeRef);
         }
   ```
   
   See more details in `ClassDef#buildFieldType`



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