You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by rw...@apache.org on 2017/05/25 20:07:30 UTC

svn commit: r1796188 - /pivot/trunk/core/src/org/apache/pivot/util/Utils.java

Author: rwhitcomb
Date: Thu May 25 20:07:30 2017
New Revision: 1796188

URL: http://svn.apache.org/viewvc?rev=1796188&view=rev
Log:
Add a new flavor of Utils.checkNull that only requires the one argument,
which will throw an IllegalArgumentException with no message.

Modified:
    pivot/trunk/core/src/org/apache/pivot/util/Utils.java

Modified: pivot/trunk/core/src/org/apache/pivot/util/Utils.java
URL: http://svn.apache.org/viewvc/pivot/trunk/core/src/org/apache/pivot/util/Utils.java?rev=1796188&r1=1796187&r2=1796188&view=diff
==============================================================================
--- pivot/trunk/core/src/org/apache/pivot/util/Utils.java (original)
+++ pivot/trunk/core/src/org/apache/pivot/util/Utils.java Thu May 25 20:07:30 2017
@@ -61,6 +61,17 @@ public class Utils {
     }
 
     /**
+     * Check if the input argument is {@code null} and throw an
+     * {@link IllegalArgumentException} with an empty message if so.
+     *
+     * @param value The argument value to check for {@code null}.
+     * @throws IllegalArgumentException if the value is {@code null}.
+     */
+    public static void checkNull(Object value) {
+        checkNull(value, null);
+    }
+
+    /**
      * Check if the input string is {@code null} or empty (or all whitespace).
      *
      * @param value The string to check.