mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 08:35:13 +00:00
HHH-12037 - Remove unused code in ArrayHelper
This commit is contained in:
parent
ed61fc9a8e
commit
47eebc5d86
@ -8,11 +8,7 @@
|
|||||||
|
|
||||||
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;
|
||||||
@ -33,12 +29,6 @@ public static int indexOf(Object[] array, Object object) {
|
|||||||
}
|
}
|
||||||
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;
|
||||||
@ -227,14 +217,6 @@ public static int countTrue(boolean... array) {
|
|||||||
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 @@ else if ( batchSize / 2 < 10 ) {
|
|||||||
* 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 static int hash(Object[] array) {
|
|||||||
* 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 static int hash(char[] array) {
|
|||||||
* 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 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user