[JAVA-1809] DocumentCodec and DBObjectCodec treat nested Maps/Iterables differently Created: 11/May/15  Updated: 04/Nov/16  Resolved: 04/Nov/16

Status: Closed
Project: Java Driver
Component/s: Codecs
Affects Version/s: 3.0.0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Jochen Kemnade Assignee: Jeffrey Yemin
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to JAVA-1760 Query failure with nested BasicDBObje... Closed
Backwards Compatibility: Minor Change

 Description   

This is closely related to JAVA-1760. The fix was made for DBObjectCodec but DocumentCodec remained unchanged. Now, in DBObjectCodec, the Map interface takes precedence over the Iterable interface whereas in DocumentCodec, it the other way around.
Since there are no compatibility issues to take care of, I suggest that DocumentCodec throw an error if "conflicting" interfaces are implemented by embedded objects.



 Comments   
Comment by Jeffrey Yemin [ 04/Nov/16 ]

The difference between DBObjectCodec and DocumentCodec in this regard is unfortunate, but as it's out there already it's possible that applications are already relying on the current behavior of DocumentCodec: changing it would break compatibility.

So reluctantly closing as Won't Fix.

Comment by Jochen Kemnade [ 08/Jul/15 ]

This is still an issue with 3.0.2.

Generated at Thu Feb 08 08:55:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.