commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r788275 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
Date Thu, 25 Jun 2009 06:58:11 GMT
Author: bayard
Date: Thu Jun 25 06:58:11 2009
New Revision: 788275

URL: http://svn.apache.org/viewvc?rev=788275&view=rev
Log:
Refactoring to avoid code duplication - LANG-458

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java?rev=788275&r1=788274&r2=788275&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/Validate.java Thu Jun 25 06:58:11
2009
@@ -218,9 +218,7 @@
      * @throws IllegalArgumentException if the object is <code>null</code>
      */
     public static void notNull(Object object) {
-        if (object == null) {
-            throw new IllegalArgumentException("The validated object is null");
-        }
+        notNull(object, "The validated object is null");
     }
 
     // notEmpty array



Mime
View raw message