Unappropriate try/catch block in method renderTemplate of Lifecycle
class
-------------------------------------------------------------------------
Key: GTNPORTAL-1506
URL:
https://issues.jboss.org/browse/GTNPORTAL-1506
Project: GateIn Portal
Issue Type: Task
Security Level: Public(Everyone can see)
Affects Versions: 3.1.0-GA
Reporter: Minh Hoang TO
Assignee: Khoi Nguyen
Labels: portal-s45
Original Estimate: 6 hours
Remaining Estimate: 6 hours
The below try/catch block is in the method renderTemplate of Lifecycle class
try
{
service.merge(template, bcontext);
}
catch (NullPointerException e)
{
log.error("Template: " + template + " not found.");
}
The log message does not reflects exactly the happening problem. In fact, the call
service.merge(template, bcontext) throws NullPointerException in two cases:
1. The template file could not be loaded (wrong path, wrong resource resolver scheme)
2. The template file is loaded but there is compilation failure
In case the NPE is due to 2, the log message might confuse developers.
For the moment, the CompilationException is caught within the FutureExoCache
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: