chaokunyang commented on code in PR #1613:
URL: https://github.com/apache/incubator-fury/pull/1613#discussion_r1593969932
##########
java/fury-core/src/main/java/org/apache/fury/serializer/collection/CollectionSerializers.java:
##########
@@ -255,6 +256,42 @@ public List<?> xread(MemoryBuffer buffer) {
}
}
+ public static class CopyOnWriteArrayListSerializer
+ extends CollectionSerializer<CopyOnWriteArrayList> {
+
+ private static final long ARRAY_OFFSET;
+
+ static {
+ try {
+ final Field field =
CopyOnWriteArrayList.class.getDeclaredField("array");
Review Comment:
Could we implement this serializer like ImmutableListSerializer. The array
field here won't be referenced by other objects. So we can use collection
serialization protocol
--
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]