You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2011/11/20 21:54:47 UTC
svn commit: r1204253 -
/commons/sandbox/meiyo/trunk/src/main/java/org/apache/commons/meiyo/classpath/PathAnalyzer.java
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
}