Details
Description
Situation:
The BuilderFactory fails to set the message-property.
Reason:
While looping over all possible localized names of the message resource
there is a uncaught NPE for not existing resources.
In the method org.apache.hivemind.util.URLResource#getResourceURL()
the call of java.net.URL#openStream() is expected to throw an
IOException if the Resource does not exist.
But in described environment the method returns silently null and
then the next statement causes an NPE which is not caught.
Solution:
In the method org.apache.hivemind.util.URLResource#getResourceURL()
change:
...
try
{
InputStream stream = test.openStream();
if (stream != null)
stream.close();
_url = test;
}
to:
...
try
{
InputStream stream = test.openStream();
if (stream != null)
}