commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BEANUTILS-416) Multiple calls to a property/method can result in a NPE
Date Sun, 05 Aug 2012 13:16:02 GMT

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

Benedikt Ritter commented on BEANUTILS-416:
-------------------------------------------

I've found out, that BeanUtils is not affected directly by this issue. Although BeanUtils
uses WeakReferences for cached values, there is code to prevent null pointers. For example:

{code:java}
Method method = getCachedMethod(md);
if (method != null) {
   return method;
}
{code}

I'd say that using WeakReferences for cached values in a WeakHashMap is broken, but since
the code is backed up against NPEs, I'm fine if this issue is resolved as won't fix, since
no failures are to be expected.
                
> Multiple calls to a property/method can result in a NPE
> -------------------------------------------------------
>
>                 Key: BEANUTILS-416
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-416
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.3
>            Reporter: Benedikt Ritter
>
> While working on BeanUtils2 we have found out, that the caching mechanism of BeanUtils
can lead to NullPointerExceptions. Details can be found in SANDBOX-433.

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

        

Mime
View raw message