commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1204253 - /commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/PathAnalyzer.java
Date Sun, 20 Nov 2011 20:54:47 GMT
Author: simonetripodi
Date: Sun Nov 20 20:54:47 2011
New Revision: 1204253

URL: http://svn.apache.org/viewvc?rev=1204253&view=rev
Log:
build the File instance only when needed

Modified:
    commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/PathAnalyzer.java

Modified: commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/PathAnalyzer.java
URL: http://svn.apache.org/viewvc/commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/PathAnalyzer.java?rev=1204253&r1=1204252&r2=1204253&view=diff
==============================================================================
--- commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/PathAnalyzer.java
(original)
+++ commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/PathAnalyzer.java
Sun Nov 20 20:54:47 2011
@@ -58,7 +58,6 @@ final class PathAnalyzer
      */
     public void run()
     {
-        File file = new File( path );
         if ( JAR_FILE.matcher( path ).matches() )
         {
             try
@@ -76,12 +75,12 @@ final class PathAnalyzer
             }
             catch ( IOException e )
             {
-                errorHandler.onJARReadingError( file, e );
+                errorHandler.onJARReadingError( new File( path ), e );
             }
         }
         else
         {
-            traverse( file, path );
+            traverse( new File( path ), path );
         }
         // else ignore it
     }



Mime
View raw message