[jboss-jira] [JBoss JIRA] (WFLY-4405) NPE in AstValue.setValue()

Farah Juma (JIRA) issues at jboss.org
Tue Jul 14 17:36:02 EDT 2015


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

Farah Juma resolved WFLY-4405.
------------------------------
    Resolution: Won't Fix


Closing this one since I'm unable to reproduce the problem. Feel free to re-open this if you have a simple reproducer app.

> NPE in AstValue.setValue()
> --------------------------
>
>                 Key: WFLY-4405
>                 URL: https://issues.jboss.org/browse/WFLY-4405
>             Project: WildFly
>          Issue Type: Bug
>          Components: JSF
>    Affects Versions: 8.2.0.Final
>         Environment: MacOS X, RHEL6
>            Reporter: Christer Bernérus
>            Assignee: Farah Juma
>
> When submitting a page made up using a custom tag, or a composite component, WildFly reports NPE in AstValue.setValue().
> The code where this happens is in javax.el-3.0.1-b05.jar and looks like this:
> {code:title=AstValue.java|borderStyle=solid}
>  /* Note by kchung 10/2013
>          * The spec does not say if the value should be cocerced to the target
>          * type before setting the value to the target. The conversion is kept
>          * here to be backward compatible.
>          */
>         ctx.setPropertyResolved(false);
>         Class<?> targetType = elResolver.getType(ctx, t.base, property);
>         if (ctx.isPropertyResolved()) {
>             ctx.setPropertyResolved(false);
>             Object targetValue = elResolver.convertToType(ctx, value, targetType);
>             if (ctx.isPropertyResolved()) {
>                 value = targetValue;
>             } else {
>                 if (value != null || targetType.isPrimitive()) {
>                     value = ELSupport.coerceToType(value, targetType);
>                 }
>             }
>         }
> {code}
> From my debugging session, I have seen that the code in
> {{elResolver.getType()}} may return null, which happens to me, 
> but the subsequent code in {{AstValue.setValue()}} happily uses that null valued variable {{targetType}} for calling the method {{isPrimitive()}} which of course causes an NPE.
> Strangely enough, this behaviour seems intermittent in that restarting WildFly might make the bug go away or come back, but redeployment does not.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)



More information about the jboss-jira mailing list