check input stream is not null on loading properties

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@550695 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2007-06-26 05:13:54 +00:00
parent 2bed73b2f1
commit bc281a209e
1 changed files with 5 additions and 3 deletions

View File

@ -71,12 +71,14 @@ public class PropertiesBrokerFactory implements BrokerFactoryHandler {
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();
}
}
if(inputStream!=null){
properties.load(inputStream);
inputStream.close();
}
// should we append any system properties?
try {