Stephan Bergmann wrote:
<http://www.openoffice.org/issues/show_bug.cgi?id=60643> is about adding a proper equals method to the Java classes that represent UNO struct (and exception) types.

In the issue, I took up the position that adding equals would be an incompatible change (code could rely on the equals being called being the base definition from Object), and so some method with another name should be introduced instead. However, thinking about it again, maybe that approach is too conservative, and leads to unnecessary complexity.

Any objections against the (incompatibl, strictly speaking) change to generate "proper" equals and hashCode methods for all the relevant Java classes?

This turned out to be poorly thought through (old class files would need to be regenerated to have equals methods; for polymorphic structs, too much information is erased to allow a proper implementation of equals; equals and inheritance do not work well together (and UNO structs and exceptions do use inheritance); etc.), so I meanwhile fixed issue 60643 in another way, not using equals and/or hashCode.

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to