As soon as I commit you'll see in rev 976dcbc the question I have, but for
the sake of getting the conversation going I'll paste the method here:
private Properties loadProperties(URL url)
{
Properties props = new Properties();
InputStream inputStream = null;
try
{
inputStream = url.openStream();
if (inputStream != null)
{
props.load(inputStream);
}
}
catch (IOException e)
{
return null; // TODO: Shouldn't this return an empty
Properties? Otherwise we could cause NPE in the getPropertyValue method
}
finally
{
try
{
if (inputStream != null)
{
inputStream.close();
}
}
catch (IOException e)
{
// no worries, means that the file is already closed
}
}
return props;
}
--
Jason Porter
http://lightguard-jp.blogspot.com
http://twitter.com/lightguardjp
Software Engineer
Open Source Advocate
Author of Seam Catch - Next Generation Java Exception Handling
PGP key id: 926CCFF5
PGP key available at: keyserver.net, pgp.mit.edu