The codec for records is not flexible when it comes to the declared types of the components for maps or collections. It works fine if the type is Iterable, Collection, List, or ArrayList for collections, and Map or HashMap for maps. But an exception will be thrown for other types, e.g. SortedSet, NavigableMap, LinkedList, TreeSet.
We should make MapCodec and IterableCodec more flexible, to handle all these cases.
- is duplicated by
-
JAVA-4620 RecordCodec fails to decode into a component of type java.util.Set
- Closed