You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2009/07/21 01:46:42 UTC

svn commit: r796070 - in /commons/proper/lang/trunk/src/java/org/apache/commons/lang: ClassUtils.java exception/ExceptionUtils.java

Author: bayard
Date: Mon Jul 20 23:46:42 2009
New Revision: 796070

URL: http://svn.apache.org/viewvc?rev=796070&view=rev
Log:
Fixing classes to not need NullArgumentException

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java?rev=796070&r1=796069&r2=796070&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/ClassUtils.java Mon Jul 20 23:46:42 2009
@@ -825,7 +825,7 @@
     private static String toCanonicalName(String className) {
         className = StringUtils.deleteWhitespace(className);
         if (className == null) {
-            throw new NullArgumentException("className");
+            throw new NullPointerException("className must not be null.");
         } else if (className.endsWith("[]")) {
             StringBuffer classNameBuffer = new StringBuffer();
             while (className.endsWith("[]")) {

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java?rev=796070&r1=796069&r2=796070&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/exception/ExceptionUtils.java Mon Jul 20 23:46:42 2009
@@ -33,7 +33,6 @@
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.commons.lang.ClassUtils;
-import org.apache.commons.lang.NullArgumentException;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.SystemUtils;
 
@@ -187,7 +186,7 @@
      */
     public static boolean setCause(Throwable target, Throwable cause) {
         if (target == null) {
-            throw new NullArgumentException("target");
+            throw new NullPointerException("target must not be null.");
         }
         Object[] causeArgs = new Object[]{cause};
         boolean modifiedTarget = false;