Skip to content

Commit 1742c8e

Browse files
committed
Use id for equality
Both nodes and relationships should only use `id` in `equals` and `hashCode`.
1 parent 44269ba commit 1742c8e

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

driver/src/main/java/org/neo4j/driver/internal/InternalNode.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -73,34 +73,4 @@ public String toString()
7373
{
7474
return String.format( "node<%s>", identity() );
7575
}
76-
77-
@Override
78-
public boolean equals( Object o )
79-
{
80-
if ( this == o )
81-
{
82-
return true;
83-
}
84-
if ( o == null || getClass() != o.getClass() )
85-
{
86-
return false;
87-
}
88-
if ( !super.equals( o ) )
89-
{
90-
return false;
91-
}
92-
93-
InternalNode that = (InternalNode) o;
94-
95-
return !(labels != null ? !labels.equals( that.labels ) : that.labels != null);
96-
97-
}
98-
99-
@Override
100-
public int hashCode()
101-
{
102-
int result = super.hashCode();
103-
result = 31 * result + (labels != null ? labels.hashCode() : 0);
104-
return result;
105-
}
10676
}

0 commit comments

Comments
 (0)