activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r550695 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/PropertiesBrokerFactory.java
Date Tue, 26 Jun 2007 05:13:54 GMT
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 {



Mime
View raw message