HHH-12037 - Remove unused code in ArrayHelper
This commit is contained in:
parent
ed61fc9a8e
commit
47eebc5d86
|
@ -8,11 +8,7 @@ package org.hibernate.internal.util.collections;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.*;
|
||||
|
||||
import org.hibernate.HibernateException;
|
||||
import org.hibernate.LockMode;
|
||||
|
@ -34,12 +30,6 @@ public final class ArrayHelper {
|
|||
return -1;
|
||||
}
|
||||
|
||||
/*public static Object[] clone(Class elementClass, Object[] array) {
|
||||
Object[] result = (Object[]) Array.newInstance( elementClass, array.length );
|
||||
System.arraycopy(array, 0, result, 0, array.length);
|
||||
return result;
|
||||
}*/
|
||||
|
||||
public static String[] toStringArray(Object[] objects) {
|
||||
int length = objects.length;
|
||||
String[] result = new String[length];
|
||||
|
@ -227,14 +217,6 @@ public final class ArrayHelper {
|
|||
return result;
|
||||
}
|
||||
|
||||
/*public static int countFalse(boolean[] array) {
|
||||
int result=0;
|
||||
for ( int i=0; i<array.length; i++ ) {
|
||||
if ( !array[i] ) result++;
|
||||
}
|
||||
return result;
|
||||
}*/
|
||||
|
||||
public static boolean isAllFalse(boolean... array) {
|
||||
for ( boolean anArray : array ) {
|
||||
if ( anArray ) {
|
||||
|
@ -291,7 +273,6 @@ public final class ArrayHelper {
|
|||
* calculate the array hash (only the first level)
|
||||
*/
|
||||
public static int hash(Object[] array) {
|
||||
int length = array.length;
|
||||
int seed = SEED;
|
||||
for ( Object anArray : array ) {
|
||||
seed = hash( seed, anArray == null ? 0 : anArray.hashCode() );
|
||||
|
@ -303,7 +284,6 @@ public final class ArrayHelper {
|
|||
* calculate the array hash (only the first level)
|
||||
*/
|
||||
public static int hash(char[] array) {
|
||||
int length = array.length;
|
||||
int seed = SEED;
|
||||
for ( char anArray : array ) {
|
||||
seed = hash( seed, anArray );
|
||||
|
@ -315,7 +295,6 @@ public final class ArrayHelper {
|
|||
* calculate the array hash (only the first level)
|
||||
*/
|
||||
public static int hash(byte[] bytes) {
|
||||
int length = bytes.length;
|
||||
int seed = SEED;
|
||||
for ( byte aByte : bytes ) {
|
||||
seed = hash( seed, aByte );
|
||||
|
|
Loading…
Reference in New Issue