Author: olamy Date: Tue Nov 13 09:01:50 2012 New Revision: 1408643 URL: http://svn.apache.org/viewvc?rev=1408643&view=rev Log: isDirectory() or isFile() already check if the file exists
Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java Modified: tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java URL: http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java?rev=1408643&r1=1408642&r2=1408643&view=diff ============================================================================== --- tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java (original) +++ tomcat/maven-plugin/trunk/common-tomcat-maven-plugin/src/main/java/org/apache/tomcat/maven/common/run/DefaultClassLoaderEntriesCalculator.java Tue Nov 13 09:01:50 2012 @@ -74,7 +74,7 @@ public class DefaultClassLoaderEntriesCa for ( String classPathElement : classPathElements ) { File classPathElementFile = new File( classPathElement ); - if ( classPathElementFile.exists() && classPathElementFile.isDirectory() ) + if ( classPathElementFile.isDirectory() ) { request.getLog().debug( "adding classPathElementFile " + classPathElementFile.toURI().toString() ); @@ -115,8 +115,7 @@ public class DefaultClassLoaderEntriesCa + artifact.getVersion() + ":" + artifact.getScope() ); // we add artifact dependencies and projects from reactor if file (ie jar) as users can go to install/package phase // so artifact.getFile is a file not a directory and not added when iterate on project.classPathElements - if ( !isInProjectReferences( artifact, request.getMavenProject() ) || ( artifact.getFile().exists() - && artifact.getFile().isFile() ) ) + if ( !isInProjectReferences( artifact, request.getMavenProject() ) || artifact.getFile().isFile() ) { String fileName = artifact.getFile().getName(); if ( !fileInClassLoaderEntries.contains( fileName ) ) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org