Bug 568416 - fix hash computation to ensure non-negative hash

One out of 2^32 strings have a hashCode of Integer.MIN_VALUE, including
"polygenelubricants" "GydZG_" and ""DESIGNING WORKHOUSES".

This and the fact that Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE
made it possible for the hash computation to return negative values
which will cause elements to not be added or looked up correctly.

Change-Id: Ic6f6cf4191d051bd7eada478a6e1ddd4d0291481
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
1 file changed
tree: 156c6704caf0b66a34cc1d7c58e20da032aacced
  1. .mvn/
  2. bundles/
  3. tests/
  4. .gitignore
  5. CONTRIBUTING
  6. CONTRIBUTING.md
  7. LICENSE
  8. NOTICE
  9. pom.xml