You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@clerezza.apache.org by "Reto Bachmann-Gmür (Reopened JIRA)" <ji...@apache.org> on 2012/02/13 21:04:59 UTC

[jira] [Reopened] (CLEREZZA-686) LockableMGraphWrapper does not implement hashCode, equals and toString

     [ 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