[gatein-issues] [JBoss JIRA] Work stopped: (GTNPORTAL-1506) Unappropriate try/catch block in method renderTemplate of Lifecycle class

Khoi Nguyen (JIRA) jira-events at lists.jboss.org
Wed Dec 22 01:12:18 EST 2010


     [ https://issues.jboss.org/browse/GTNPORTAL-1506?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on GTNPORTAL-1506 stopped by Khoi Nguyen.

> 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
>             Fix For: 3.2.0-GA
>
>   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: http://www.atlassian.com/software/jira

        


More information about the gatein-issues mailing list