[
https://issues.apache.org/jira/browse/CODEC-302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17381473#comment-17381473
]
Gilles Sadowski commented on CODEC-302:
---------------------------------------
On [http://murmurhash.shorelabs.com/] the string
{noformat}
This test should return positive.
{noformat}
and seed
{noformat}
1
{noformat}
return
{noformat}
3461248272
{noformat}
i.e. the same output as
{code:java}
final int hash = MurmurHash2.hash32(string.getBytes(StandardCharsets.UTF_8),
string.length(), 1);
System.out.println(Integer.toUnsignedString(hash));
{code}
from Commons Codec.
> 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)