Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4742

Support record components with more specific container class types

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.8.0
    • Affects Version/s: None
    • Component/s: POJO
    • None
    • Fully Compatible
    • Needed

      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.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: