mirror of https://github.com/apache/activemq.git
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:
parent
2bed73b2f1
commit
bc281a209e
|
@ -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);
|
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();
|
inputStream = url.openStream();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
properties.load(inputStream);
|
if(inputStream!=null){
|
||||||
inputStream.close();
|
properties.load(inputStream);
|
||||||
|
inputStream.close();
|
||||||
|
}
|
||||||
|
|
||||||
// should we append any system properties?
|
// should we append any system properties?
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue