Skip to content

Commit 396fe1f

Browse files
hansonrhansonr
authored andcommitted
removes integer overflow on AbstractList.hashCode()
1 parent bd76d49 commit 396fe1f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sources/net.sf.j2s.java.core/src/java/util/AbstractList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ public boolean equals(Object o) {
538538
public int hashCode() {
539539
int hashCode = 1;
540540
for (E e : this)
541-
hashCode = 31*hashCode + (e==null ? 0 : e.hashCode());
541+
hashCode = (31*hashCode + (e==null ? 0 : e.hashCode()))& 0xFFFFFFFF;
542542
return hashCode;
543543
}
544544

0 commit comments

Comments
 (0)