commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r592606 - in /commons/proper/io/trunk/src: java/org/apache/commons/io/FilenameUtils.java test/org/apache/commons/io/FilenameUtilsTestCase.java
Date Wed, 07 Nov 2007 04:17:01 GMT
Author: niallp
Date: Tue Nov  6 20:17:01 2007
New Revision: 592606

URL: http://svn.apache.org/viewvc?rev=592606&view=rev
Log:
IO-128 Change to NullPointerException so that behaviour is unchanged from before - just better
error message

Modified:
    commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java

Modified: commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java?rev=592606&r1=592605&r2=592606&view=diff
==============================================================================
--- commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java (original)
+++ commons/proper/io/trunk/src/java/org/apache/commons/io/FilenameUtils.java Tue Nov  6 20:17:01
2007
@@ -978,7 +978,7 @@
             filename1 = normalize(filename1);
             filename2 = normalize(filename2);
             if (filename1 == null || filename2 == null) {
-                throw new IllegalArgumentException(
+                throw new NullPointerException(
                     "Error normalizing one or both of the file names");
             }
         }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java?rev=592606&r1=592605&r2=592606&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/FilenameUtilsTestCase.java Tue
Nov  6 20:17:01 2007
@@ -791,19 +791,19 @@
         try {
             FilenameUtils.equalsNormalizedOnSystem("//file.txt", "file.txt");
             fail("Invalid normalized first file");
-        } catch(IllegalArgumentException e) {
+        } catch(NullPointerException e) {
             // expected result
         }
         try {
             FilenameUtils.equalsNormalizedOnSystem("file.txt", "//file.txt");
             fail("Invalid normalized second file");
-        } catch(IllegalArgumentException e) {
+        } catch(NullPointerException e) {
             // expected result
         }
         try {
             FilenameUtils.equalsNormalizedOnSystem("//file.txt", "//file.txt");
             fail("Invalid normalized both filse");
-        } catch(IllegalArgumentException e) {
+        } catch(NullPointerException e) {
             // expected result
         }
     }



Mime
View raw message