[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Commented: (XMLBEANS-166) Generated classes should implement
From:       "Radu Preotiuc-Pietro (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2009-01-13 23:10:59
Message-ID: 536803654.1231888259844.JavaMail.jira () brutus
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/XMLBEANS-166?page=com.atlassian.jira.plugi \
n.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663530#action_12663530 ] 

Radu Preotiuc-Pietro commented on XMLBEANS-166:
-----------------------------------------------

I am not understanding what is the problem with the current hashCode(), more exactly \
what makes the equals() adequate but the hashCode() not. If equals() had deepEquals() \
semantics (which is not possible in practice), then of course hashCode() would have \
to also be modified and would consequently become too slow to be usable. If equals() \
stays the default, why is there any need to change hashCode(), is the part that I am \
missing.

> Generated classes should implement equals and hashcode
> ------------------------------------------------------
> 
> Key: XMLBEANS-166
> URL: https://issues.apache.org/jira/browse/XMLBEANS-166
> Project: XMLBeans
> Issue Type: Improvement
> Affects Versions: Version 1
> Environment: n/a
> Reporter: Peter Monks
> Assignee: Lawrence Jones
> Priority: Minor
> 
> It would be ideal if the classes generated by XMLBeans from an XML schema \
> implemented the equals and hashcode methods, preferably with "deep" semantics (ie. \
> contained objects are recursively compared using equals rather than ==). At this \
> point we're using the output of the xmlText method for equivalence comparisons, but \
> that's a bit of a hack and depends on deterministic behaviour in the xmlText method \
> (which is likely, but afaict not guaranteed by XMLBeans).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic