activemq-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=418683&view=rev
Log:
NPE checking

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

Modified: incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java?rev=418683&r1=418682&r2=418683&view=diff
==============================================================================
--- incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java
(original)
+++ incubator/activemq/trunk/tooling/maven-activemq-perf-plugin/src/main/java/org/apache/activemq/tool/AbstractJmsClientSystem.java
Sun Jul  2 22:09:17 2006
@@ -233,6 +233,11 @@
     protected static Properties parseStringArgs(String[] args) {
         File configFile = null;
         Properties props = new Properties();
+
+        if (args == null || args.length == 0) {
+            return props; // Empty properties
+        }
+        
         for (int i=0; i<args.length; i++) {
             String arg = args[i];
             if (arg.startsWith("-D") || arg.startsWith("-d")) {
@@ -253,7 +258,9 @@
 
         Properties fileProps = new Properties();
         try {
-            fileProps.load(new FileInputStream(configFile));
+            if (configFile != null) {
+                fileProps.load(new FileInputStream(configFile));
+            }
         } catch (IOException e) {
             e.printStackTrace();
         }



Mime
View raw message