commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r1056849 - /commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java
Date Sun, 09 Jan 2011 00:49:12 GMT
Author: niallp
Date: Sun Jan  9 00:49:12 2011
New Revision: 1056849

URL: http://svn.apache.org/viewvc?rev=1056849&view=rev
Log:
port r980201 to LANG 2.x branch - simplify code

Modified:
    commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java

Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java?rev=1056849&r1=1056848&r2=1056849&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java
(original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/ArrayUtils.java
Sun Jan  9 00:49:12 2011
@@ -3183,10 +3183,7 @@ public class ArrayUtils {
      * @since 2.1
      */
     public static boolean isEmpty(Object[] array) {
-        if (array == null || array.length == 0) {
-            return true;
-        }
-        return false;
+        return array == null || array.length == 0;
     }
 
     /**
@@ -3197,10 +3194,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;
     }
 
     /**
@@ -3211,10 +3205,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;
     }
 
     /**
@@ -3225,10 +3216,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;
     }
 
     /**
@@ -3239,10 +3227,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;
     }
 
     /**
@@ -3253,10 +3238,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;
     }
 
     /**
@@ -3267,10 +3249,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;
     }
 
     /**
@@ -3281,10 +3260,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;
     }
 
     /**
@@ -3295,10 +3271,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;
     }
 
     // ----------------------------------------------------------------------



Mime
View raw message