11/*
2- * Copyright (c) 2015, 2023 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2015, 2024 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -200,7 +200,7 @@ public static int vectorizedMismatch(Object a, long aOffset,
200200 public static int vectorizedHashCode (Object array , int fromIndex , int length , int initialValue ,
201201 int basicType ) {
202202 return switch (basicType ) {
203- case T_BOOLEAN -> signedHashCode (initialValue , (byte []) array , fromIndex , length );
203+ case T_BOOLEAN -> unsignedHashCode (initialValue , (byte []) array , fromIndex , length );
204204 case T_CHAR -> array instanceof byte []
205205 ? utf16hashCode (initialValue , (byte []) array , fromIndex , length )
206206 : hashCode (initialValue , (char []) array , fromIndex , length );
@@ -211,7 +211,7 @@ public static int vectorizedHashCode(Object array, int fromIndex, int length, in
211211 };
212212 }
213213
214- private static int signedHashCode (int result , byte [] a , int fromIndex , int length ) {
214+ private static int unsignedHashCode (int result , byte [] a , int fromIndex , int length ) {
215215 int end = fromIndex + length ;
216216 for (int i = fromIndex ; i < end ; i ++) {
217217 result = 31 * result + (a [i ] & 0xff );
0 commit comments