incubator-clerezza-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reto Bachmann-Gmür (Reopened) (JIRA) <j...@apache.org>
Subject [jira] [Reopened] (CLEREZZA-686) LockableMGraphWrapper does not implement hashCode, equals and toString
Date Mon, 13 Feb 2012 20:04:59 GMT

     [ https://issues.apache.org/jira/browse/CLEREZZA-686?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Reto Bachmann-Gmür reopened CLEREZZA-686:
-----------------------------------------


I realize the patch implements my suggestion, but it just occurs to me that it breaks the
spec for equals as it is no longer symmetric.

e.g:

val g = new SomeMGraph()
val w = new LockableMGraphWrapper(g);


q.equals(w) != w.equals(g)

So I think the correct implementation would be to call wrapped.equals(other.wrapped) iff other
is a LockableMGraphWrapper and return false otherwise.

                
> LockableMGraphWrapper does not implement hashCode, equals and toString
> ----------------------------------------------------------------------
>
>                 Key: CLEREZZA-686
>                 URL: https://issues.apache.org/jira/browse/CLEREZZA-686
>             Project: Clerezza
>          Issue Type: Improvement
>          Components: rdf.core
>            Reporter: Rupert Westenthaler
>            Assignee: Daniel Spicar
>            Priority: Trivial
>         Attachments: CLEREZZA-686_rdf.core-LockableMGraphWrapper-hasCode-equals-toString.patch
>
>
> LockableMGraphWrapper does not implement hashCode, equals and toString. This is not a
big issue, because MGraphs are rarely used with sets or maps, but it is at least inconvenient
for logging and debugging.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message