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: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to