[ 
https://issues.apache.org/jira/browse/MYFACES-3413?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Kienenberger resolved MYFACES-3413.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.5-SNAPSHOT

Leave value as empty string if no ExpressionString.
                
> Default MyFaces Error handling throws NullPointerException during component 
> tree when javax.el.Expression.getExpressionString() is null
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3413
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3413
>             Project: MyFaces Core
>          Issue Type: Bug
>          Components: JSR-314
>    Affects Versions: 2.1.3
>            Reporter: Mike Kienenberger
>            Assignee: Mike Kienenberger
>            Priority: Minor
>             Fix For: 2.1.5-SNAPSHOT
>
>
> The default MyFaces Error handling throws a NullPointerException during the 
> writing out of the component tree when an attribute's 
> ValueExpression.getExpressionString() returns null.
> As an example, this can happen with Richfaces 4.1.x skinning as the 
> org.richfaces.application.GlobalResourcesViewHandler$SkinningResourceRenderedExpression
> used for "rendered" on the __rf_skinning_resource UIOutput has a null value 
> for getExpressionString().
> From what I can tell, it's legal for Expression.getExpressionString() to 
> return null.
> http://docs.oracle.com/javaee/5/api/javax/el/Expression.html#getExpressionString%28%29
> In any case, since this is an error handling routine, it should
> probably be more flexible in handling unexpected values.
> What do we want to do in this case?
> We could skip outputting the attribute.
> We could output the attribute with empty string as the value expression.
> In this particular case, we could check for isReadOnly() and if true, output 
> getValue().   Not sure if we'd want to do that in the case of !isReadOnly().  
> In fact, I'm not entirely certain we want to be evaluating getValue().
> We could output the class of the value expression.
> As a first pass, I am going to output the value expression as the empty 
> string.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to