[
https://jira.jboss.org/browse/WELD-730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pete Muir closed WELD-730.
--------------------------
Fix Version/s: 1.1.0.Beta3
(was: 1.1.0.CR1)
Resolution: Done
> WeldApplication shouldn't assume FacesContext is available when attempting
> lazy initialization
> ----------------------------------------------------------------------------------------------
>
> Key: WELD-730
> URL: https://jira.jboss.org/browse/WELD-730
> Project: Weld
> Issue Type: Bug
> Components: Servlet Container Support
> Affects Versions: 1.1.0.Beta1
> Reporter: Dan Allen
> Assignee: Dan Allen
> Priority: Minor
> Fix For: 1.1.0.Beta3
>
>
> WeldApplication uses a forwarding wrapper around the delegate JSF Application
> object in order to get around the fact that BeanManager may not have been
> initialized at the time JSF is initializing. However, it assumes that the
> first use of Application will be during a faces request, where FacesContext
> is available. However, the JSF Application object is permitted to be accessed
> outside of the faces lifecycle (such as in a Servlet filter). When this
> occurs, a NullPointerException in WeldApplication results.
> WeldApplication should skip the BeanManager lookup if the FacesContext is
> null.
> private BeanManager beanManager()
> {
> FacesContext facesContext;
> if (beanManager != null && (facesContext =
> FacesContext.getCurrentInstance()) != null) {
> // lookup BeanManager
> }
> }
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues