Support anydata and anyxml statements in Binding V1 (MDSAL-10)

[MDSAL-439] Define OpaqueObject and OpaqueData equality contract Created: 12/Apr/19  Updated: 15/Apr/19  Resolved: 15/Apr/19

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:
Blocks
blocks MDSAL-437 Generate binding interfaces for anyxm... Resolved

 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.

Generated at Wed Feb 07 20:09:49 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.