[ https://issues.apache.org/jira/browse/TINKERPOP-1259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Marko A. Rodriguez closed TINKERPOP-1259. ----------------------------------------- Resolution: Won't Fix {{DetachedXXX}} and {{ReferenceXXX}} all use the same {{id}} for their equality and hashCodes to the respective provider {{XXX}}. For provider specific problems like this, please first bring up on the mailing list as this is a provider issue, not a TinkerPop issue. > SerializationTest.shouldSerializeTree fails due to id() and hashCode() > ---------------------------------------------------------------------- > > Key: TINKERPOP-1259 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1259 > Project: TinkerPop > Issue Type: Bug > Components: test-suite > Affects Versions: 3.2.1 > Reporter: pieter martin > > The tests fails on the last > {code} > assertEquals("The objects differ", after, before) > {code} > The 2 trees are however correct but due to differences in the > {{DetachedVertexProperty}} and {{SqlgVertexProperty}} {{id()}}, {{equals()}} > and {{hashCode()}} implementation the 2 trees are not equal. > {{DetachedVertexProperty}} uses the {{element}}'s {{id}} as its {{id}} and > that is used in the {{equals}} and {{hashCode}} method basically making a > property equal to an element. > {{SqlgVertexProperty}} has a more sophisticated {{id()}} > {code} > return (long) (this.key().hashCode() + this.value().hashCode() + > this.element().id().hashCode()) > {code} > If I change this to be the same as {{DetachedVertexProperty}} then the test > passes but I am not sure that it would be correct. -- This message was sent by Atlassian JIRA (v6.3.4#6332)