mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8332826: Make hashCode methods in ArraysSupport friendlier
Reviewed-by: redestad, liach
This commit is contained in:
parent
2b4a4b7bd8
commit
3cff588a31
13 changed files with 234 additions and 80 deletions
|
@ -290,8 +290,7 @@ class ZipCoder {
|
|||
// exceptions eagerly when opening ZipFiles
|
||||
return hash(JLA.newStringUTF8NoRepl(a, off, len));
|
||||
}
|
||||
// T_BOOLEAN to treat the array as unsigned bytes, in line with StringLatin1.hashCode
|
||||
int h = ArraysSupport.vectorizedHashCode(a, off, len, 0, ArraysSupport.T_BOOLEAN);
|
||||
int h = ArraysSupport.hashCodeOfUnsigned(a, off, len, 0);
|
||||
if (a[end - 1] != '/') {
|
||||
h = 31 * h + '/';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue