Support anydata and anyxml statements in Binding V1
(MDSAL-10)
|
|
| Status: | Resolved |
| Project: | mdsal |
| Component/s: | Binding Spec |
| Affects Version/s: | None |
| Fix Version/s: | 4.0.1, 3.0.9 |
| Type: | Sub-task | Priority: | Medium |
| Reporter: | Robert Varga | Assignee: | Robert Varga |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Generating anyxml/anydata properties has a direct implication on DataObject.equals(). Since we currently do not define an equality contract, the default is identity comparison, which is wrong and breaks with proxying – if we generate two proxies, we will end up blowing up if we're not careful. The contract needs to be defaulted in OpaqueData first: compare the representations and then the values. Implementations of OpaqueValue can then decide how to compare (via a default method). For OpaqueObjects, we first need to compare implementedInterface() and then compare OpaqueData. |
| Comments |
| Comment by Robert Varga [ 12/Apr/19 ] |
|
Unfortunately we cannot make hashCode()/equals() default methods, hence we need to provide additional guidance to implementations. |