activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r418688 - /incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java
Date Mon, 03 Jul 2006 05:45:43 GMT
Author: aco
Date: Sun Jul  2 22:45:42 2006
New Revision: 418688

URL: http://svn.apache.org/viewvc?rev=418688&view=rev
Log:
Added warning message if file is not found.

Modified:
    incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java?rev=418688&r1=418687&r2=418688&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/spi/ClassLoaderSPIConnectionFactory.java
Sun Jul  2 22:45:42 2006
@@ -51,15 +51,20 @@
                 String dir = tokens.nextToken();
                 try {
                     File f = new File(dir);
-                    log.info("Adding extension dir: " + f.getAbsolutePath());
-                    urls.add(f.toURL());
+                    if (!f.exists()) {
+                        log.warn("Cannot find extension dir: " + f.getAbsolutePath());
+                    } else {
+                        log.info("Adding extension dir: " + f.getAbsolutePath());
 
-                    File[] files = f.listFiles();
-                    if( files!=null ) {
-                        for (int j = 0; j < files.length; j++) {
-                            if( files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar")
) {
-                                log.info("Adding extension dir: " + files[j].getAbsolutePath());
-                                urls.add(files[j].toURL());
+                        urls.add(f.toURL());
+
+                        File[] files = f.listFiles();
+                        if( files!=null ) {
+                            for (int j = 0; j < files.length; j++) {
+                                if( files[j].getName().endsWith(".zip") || files[j].getName().endsWith(".jar")
) {
+                                    log.info("Adding extension dir: " + files[j].getAbsolutePath());
+                                    urls.add(files[j].toURL());
+                                }
                             }
                         }
                     }



Mime
View raw message