You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ra...@apache.org on 2007/06/26 07:13:54 UTC

svn commit: r550695 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java

Author: rajdavies
Date: Mon Jun 25 22:13:54 2007
New Revision: 550695

URL: http://svn.apache.org/viewvc?view=rev&rev=550695
Log:
check input stream is not null on loading properties

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java?view=diff&rev=550695&r1=550694&r2=550695
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java (original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java Mon Jun 25 22:13:54 2007
@@ -71,12 +71,14 @@
                     throw new IOException("File does not exist: " + remaining + ", could not be found on the classpath and is not a valid URL: " + e);
                 }
             }
-            if (inputStream == null) {
+            if (inputStream == null && url != null) {
                 inputStream = url.openStream();
             }
         }
-        properties.load(inputStream);
-        inputStream.close();
+        if(inputStream!=null){
+            properties.load(inputStream);
+            inputStream.close();
+        }
 
         // should we append any system properties?
         try {