[ 
https://issues.apache.org/jira/browse/CODEC-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381115#comment-17381115
 ] 

Iris Scholer commented on CODEC-302:
------------------------------------

Yes, the result is different. I attached a simple JUnit test that shows this. 
The test hash was generated using [this site|http://murmurhash.shorelabs.com/] 
which generates values consistent with the original implementation, as well as 
with a [different Java library|https://github.com/sangupta/murmur] I have 
tested. 
!test-screenshot.png! 
Screenshot of the output after running the test.

[^MurmurTest.java]

> MurmurHash2.hash32 can return negative
> --------------------------------------
>
>                 Key: CODEC-302
>                 URL: https://issues.apache.org/jira/browse/CODEC-302
>             Project: Commons Codec
>          Issue Type: Bug
>    Affects Versions: 1.15
>            Reporter: Iris Scholer
>            Priority: Major
>         Attachments: MurmurTest.java, test-screenshot.png
>
>
> When running hash32, many values return a negative hash. Since the original 
> implementation used unsigned values, this is unintended behavior and breaks 
> compatibility with other implementations.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to