Eduard Tudenhoefner created TINKERPOP-2164:
----------------------------------------------
Summary: Bytecode.Bindings's hashCode impl can produce hash
collisions
Key: TINKERPOP-2164
URL: https://issues.apache.org/jira/browse/TINKERPOP-2164
Project: TinkerPop
Issue Type: Improvement
Components: server
Affects Versions: 3.3.5
Reporter: Eduard Tudenhoefner
Looking at the {{hashCode()}} implementation of {{Bytecode.Binding}}, it can
produce hash collisions and therefore should be improved.
This can be reproduced with:
{code:java}
System.out.println("first = " + new Bytecode.Binding("3", "7").hashCode());
System.out.println("second = " + new Bytecode.Binding("7", "3").hashCode());
System.out.println("equal? = " + new Bytecode.Binding("3", "7").equals(new
Bytecode.Binding("7", "3")));{code}
which will print:
{code:java}
first = 106
second = 106
equal? = false{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)