[JAVA-4742] Support record components with more specific container class types Created: 28/Sep/22 Updated: 28/Oct/23 Resolved: 27/Oct/22 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | POJO |
| Affects Version/s: | None |
| Fix Version/s: | 4.8.0 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Documentation Changes: | Needed | ||||||||||||
| Description |
|
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. |
| Comments |
| Comment by Githook User [ 27/Oct/22 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Support decoding to Collection and Map subclasses (#1019)
|