s/if (foo) { return true; } return false;/return foo;/g

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@980201 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Matthew Jason Benson 2010-07-28 20:40:16 +00:00
parent c6ba216574
commit 5bfa8550e8
1 changed files with 10 additions and 37 deletions

View File

@ -3219,11 +3219,8 @@ public class ArrayUtils {
* @return <code>true</code> if the array is empty or <code>null</code>
* @since 2.1
*/
public static <T> boolean isEmpty(T[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
public static boolean isEmpty(Object[] array) {
return array == null || array.length == 0;
}
/**
@ -3234,10 +3231,7 @@ public class ArrayUtils {
* @since 2.1
*/
public static boolean isEmpty(long[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
return array == null || array.length == 0;
}
/**
@ -3248,10 +3242,7 @@ public class ArrayUtils {
* @since 2.1
*/
public static boolean isEmpty(int[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
return array == null || array.length == 0;
}
/**
@ -3262,10 +3253,7 @@ public class ArrayUtils {
* @since 2.1
*/
public static boolean isEmpty(short[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
return array == null || array.length == 0;
}
/**
@ -3276,10 +3264,7 @@ public class ArrayUtils {
* @since 2.1
*/
public static boolean isEmpty(char[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
return array == null || array.length == 0;
}
/**
@ -3290,10 +3275,7 @@ public class ArrayUtils {
* @since 2.1
*/
public static boolean isEmpty(byte[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
return array == null || array.length == 0;
}
/**
@ -3304,10 +3286,7 @@ public class ArrayUtils {
* @since 2.1
*/
public static boolean isEmpty(double[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
return array == null || array.length == 0;
}
/**
@ -3318,10 +3297,7 @@ public class ArrayUtils {
* @since 2.1
*/
public static boolean isEmpty(float[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
return array == null || array.length == 0;
}
/**
@ -3332,10 +3308,7 @@ public class ArrayUtils {
* @since 2.1
*/
public static boolean isEmpty(boolean[] array) {
if (array == null || array.length == 0) {
return true;
}
return false;
return array == null || array.length == 0;
}
// ----------------------------------------------------------------------