[JAVA-2760] Codec conversion for list of list Created: 29/Jan/18 Updated: 28/Oct/23 Resolved: 30/Jan/18 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Rohit Jain | Assignee: | Unassigned |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
I am getting following error "readStartArray can only be called when CurrentBSONType is ARRAY, not when CurrentBSONType is NULL" It is trying to convert into List<List<T>> , { "id" : 10927810, } ], |
| Comments |
| Comment by Ross Lawley [ 30/Jan/18 ] |
|
Hi rohit.jain, This is a duplicate of Ross |
| Comment by Githook User [ 30/Jan/18 ] |
|
Author: {'email': 'ross.lawley@gmail.com', 'name': 'Ross Lawley', 'username': 'rozza'}Message: Tests: Extra PojoCodec tests for nulls in collections
|
| Comment by Rohit Jain [ 30/Jan/18 ] |
|
There is a value which is null in the list, I can see why conversion will fail. Is there a work around for this ? May be write my own codec which extends current BsonArrayCodec and handle null or implement a custom codec which only handles this particular pojo. If that is the solution, I would appreciate if you could point me to appropriate documentation to do so. |