I'm trying to figure out why "theme.properties" isn't loaded from the
filesystem on my JBoss 7 system and believe that this is a useful change to
BaseTemplateEngine.java:
private InputStream createFileInputStream(File propFile) throws
FileNotFoundException {
InputStream is = null;
if (propFile.exists()) {
is = new FileInputStream(propFile);
+ } else {
+ throw new FileNotFoundException(propFile.toString());
+ }
return is;
}
This change allows the following message to be seen from the calling method:
LOG.warn("Unable to find file in filesystem [" +
propFile.getAbsolutePath() + "]");
Without this change, no warning is printed (unless there's a problem
creating the FileInputStream).
Alternately, one could remove the check for "propFile.exists()" entirely
and allow the constructor for FileInputStream to throw the exception itself.
-rgm