commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simone Tripodi <simonetrip...@apache.org>
Subject Re: [Digester] help on fixing NP_NULL_ON_SOME_PATH findbugs error
Date Sat, 02 Jul 2011 19:38:29 GMT
Salut Luc,
just to let you know I finally figured out how to fix that error, take
a look at r1142280[1].
Thanks for your support, I'm now ready to push a new RC!
All the best, have a nice WE!
Simo

[1]http://svn.apache.org/viewvc?view=revision&revision=1142280

http://people.apache.org/~simonetripodi/
http://www.99soft.org/



On Sat, Jul 2, 2011 at 9:25 PM, Simone Tripodi <simonetripodi@apache.org> wrote:
> Thanks for your help Luc!
> I'm currently investigating, the CallMethodRule worked in that way for
> ages - at least since before I joined the commons - the check you are
> proposing makes a lot of sense.
> I'll keep you updated, thanks!!!
> Have a nice day, all the best,
> Simo
>
> http://people.apache.org/~simonetripodi/
> http://www.99soft.org/
>
>
>
> On Sat, Jul 2, 2011 at 8:32 PM, Luc Maisonobe <Luc.Maisonobe@free.fr> wrote:
>> Le 02/07/2011 20:05, Simone Tripodi a écrit :
>>>
>>> Hi all guys,
>>> it could be a silly questions, but I need help on fixing a
>>> NP_NULL_ON_SOME_PATH findbugs error, I don't see where the violation
>>> is.
>>> The problem is
>>>
>>>     Possible null pointer dereference of CallMethodRule.paramTypes in
>>> org.apache.commons.digester3.CallMethodRule.end(String, String) line
>>> 459
>>
>> I guess parmarTypes can be null. If you explicitely test for null at some
>> point in your code, findbugs consider the corresponding variable is more
>> prone to be null and start to also check it.
>>
>> In this case, you test agains null at line 429, and in an unrelated code
>> path later on you use paramtypes (to get its length) without checking it is
>> null.
>>
>> Perhaps you should protect the building of the paramValues array when
>> paramTypes is null ?
>>
>> Luc
>>
>>>
>>> you can browse the class on SVN[1]
>>>
>>> Many thanks in advance, feel free to commit yourself if/once found
>>> where the bug is!!!
>>> All the best, have a nice day,
>>> Simo
>>>
>>> [1]
>>> http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester3/CallMethodRule.java?view=markup
>>>
>>> http://people.apache.org/~simonetripodi/
>>> http://www.99soft.org/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message