[
https://issues.apache.org/jira/browse/TINKERPOP-2164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16772752#comment-16772752
]
ASF GitHub Bot commented on TINKERPOP-2164:
-------------------------------------------
nastra commented on pull request #1067: TINKERPOP-2164: Reduce chance of hash
collisions in Bytecode and its inner classes
URL: https://github.com/apache/tinkerpop/pull/1067
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Bytecode's hashCode impl (and its inner classes) 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
> Priority: Major
>
> 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)