myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinschek (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-2607) Ugly NPE in CompositeFunctionMapper.resolveFunction() if second FunctionMapper is null
Date Tue, 16 Mar 2010 16:02:27 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845957#action_12845957
] 

Martin Marinschek commented on MYFACES-2607:
--------------------------------------------

Hi Jakob,

in general, it is not really a good idea to try to get rid of null pointer exceptions, if
(as you say in the second part of the comment) a null value is not expected at this location.
The general rule is: the earlier an exception happens, the better for finding out why it occurs!

best regards,

Martin

> Ugly NPE in CompositeFunctionMapper.resolveFunction() if second FunctionMapper is null
> --------------------------------------------------------------------------------------
>
>                 Key: MYFACES-2607
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2607
>             Project: MyFaces Core
>          Issue Type: Task
>          Components: JSR-314
>    Affects Versions: 2.0.0-beta-3
>            Reporter: Jakob Korherr
>            Assignee: Jakob Korherr
>            Priority: Minor
>             Fix For: 2.0.0-beta-3
>
>
> The class CompositeFunctionMapper gets two FunctionMappers in the constructor which it
uses to resolve EL functions in its method resolveFunction(). Currently the first FunctionMapper
is always NamespaceHandler and the second one is the one from the ELContext, which is null
at all times. I think this is also a problem, but at first I want to get rid of this ugly
NPE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message