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

Rahul Akolkar resolved DIGESTER-121.
------------------------------------

    Resolution: Won't Fix

The report makes sense, thanks. In looking at the code the constructors are 
taking care that 'paramTypes' is not null. The null check could be removed, but 
its really not causing any harm either. Resolving as Won't Fix.


> Possible null pointer dereference in CallMethodRule.end()
> ---------------------------------------------------------
>
>                 Key: DIGESTER-121
>                 URL: https://issues.apache.org/jira/browse/DIGESTER-121
>             Project: Commons Digester
>          Issue Type: Improvement
>    Affects Versions: 1.8
>            Reporter: David Dillard
>            Priority: Trivial
>
> Here's part of the code for the end() method (I've removed the comments):
>         } else if (paramTypes != null && paramTypes.length != 0) {
>             if (bodyText == null) {
>                 return;
>             }
>             parameters = new Object[1];
>             parameters[0] = bodyText;
>             if (paramTypes.length == 0) {
>                 paramTypes = new Class[1];
>                 paramTypes[0] = String.class;
>             }
>         } else {
>             ;
>         }
>         Object paramValues[] = new Object[paramTypes.length];
> In the first line of the above code paramTypes is checked to make sure that 
> it's not null, implying it could be null.  However, in the last line of the 
> above code paramTypes is assumed to be non-null.  So, either an additional 
> check is necessary or the testing of paramTypes being null in the beginning 
> isn't necessary.
> This was detected by FindBugs.

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

Reply via email to