HHH-12037 - Remove unused code in ArrayHelper

This commit is contained in:
fernando 2016-03-20 15:33:34 -07:00 committed by Vlad Mihalcea
parent ed61fc9a8e
commit 47eebc5d86
1 changed files with 1 additions and 22 deletions

View File

@ -8,11 +8,7 @@ package org.hibernate.internal.util.collections;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Array; import java.lang.reflect.Array;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.hibernate.LockMode; import org.hibernate.LockMode;
@ -34,12 +30,6 @@ public final class ArrayHelper {
return -1; 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) { public static String[] toStringArray(Object[] objects) {
int length = objects.length; int length = objects.length;
String[] result = new String[length]; String[] result = new String[length];
@ -227,14 +217,6 @@ public final class ArrayHelper {
return result; 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) { public static boolean isAllFalse(boolean... array) {
for ( boolean anArray : array ) { for ( boolean anArray : array ) {
if ( anArray ) { if ( anArray ) {
@ -291,7 +273,6 @@ public final class ArrayHelper {
* calculate the array hash (only the first level) * calculate the array hash (only the first level)
*/ */
public static int hash(Object[] array) { public static int hash(Object[] array) {
int length = array.length;
int seed = SEED; int seed = SEED;
for ( Object anArray : array ) { for ( Object anArray : array ) {
seed = hash( seed, anArray == null ? 0 : anArray.hashCode() ); seed = hash( seed, anArray == null ? 0 : anArray.hashCode() );
@ -303,7 +284,6 @@ public final class ArrayHelper {
* calculate the array hash (only the first level) * calculate the array hash (only the first level)
*/ */
public static int hash(char[] array) { public static int hash(char[] array) {
int length = array.length;
int seed = SEED; int seed = SEED;
for ( char anArray : array ) { for ( char anArray : array ) {
seed = hash( seed, anArray ); seed = hash( seed, anArray );
@ -315,7 +295,6 @@ public final class ArrayHelper {
* calculate the array hash (only the first level) * calculate the array hash (only the first level)
*/ */
public static int hash(byte[] bytes) { public static int hash(byte[] bytes) {
int length = bytes.length;
int seed = SEED; int seed = SEED;
for ( byte aByte : bytes ) { for ( byte aByte : bytes ) {
seed = hash( seed, aByte ); seed = hash( seed, aByte );