commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (BEANUTILS-300) NPE in LazyDynaList
Date Wed, 02 Apr 2008 17:57:26 GMT

    [ https://issues.apache.org/jira/browse/BEANUTILS-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584698#action_12584698
] 

Niall Pemberton commented on BEANUTILS-300:
-------------------------------------------

I think this is probably a false positive, since the setElementType() / setElementDynaClass()
methods set either the wrapDynaClass or elementDynaClass variables and theres code before
the snippet you post which should ensure these are called:

{code:java}
            if (elementType == null) {
                setElementDynaClass(new LazyDynaClass());
            }

            // Get DynaClass (restore WrapDynaClass lost in serialization)
            DynaClass dynaClass = (elementDynaClass == null) ? wrapDynaClass : elementDynaClass;
            if (dynaClass == null) {
                setElementType(elementType);
            }
{code}

> NPE in LazyDynaList
> -------------------
>
>                 Key: BEANUTILS-300
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-300
>             Project: Commons BeanUtils
>          Issue Type: Bug
>         Environment: Fortify
>            Reporter: Henri Yandell
>             Fix For: 1.8.0
>
>
> The transform() method does not protect lazyDynaClass from being null when the new DynaBean
is created.
> Throw an exception? Or should the setElementType(..) call be joined by a lazyDynaClass=...something....

-- 
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