commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1326681 - /commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java
Date Mon, 16 Apr 2012 16:42:43 GMT
Author: ggregory
Date: Mon Apr 16 16:42:42 2012
New Revision: 1326681

URL: http://svn.apache.org/viewvc?rev=1326681&view=rev
Log:
No need for a message local var.

Modified:
    commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java

Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java?rev=1326681&r1=1326680&r2=1326681&view=diff
==============================================================================
--- commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java (original)
+++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java Mon Apr 16
16:42:42 2012
@@ -2360,13 +2360,11 @@ public class FileUtils {
      */
     public static long sizeOfDirectory(File directory) {
         if (!directory.exists()) {
-            String message = directory + " does not exist";
-            throw new IllegalArgumentException(message);
+            throw new IllegalArgumentException(directory + " does not exist");
         }
 
         if (!directory.isDirectory()) {
-            String message = directory + " is not a directory";
-            throw new IllegalArgumentException(message);
+            throw new IllegalArgumentException(directory + " is not a directory");
         }
 
         long size = 0;



Mime
View raw message