A NullPointerException is thrown in case of an attempt to dereference a null value. The dereference may be a function call, a read or write of a field, or an array access. An ANDROID.NPE error is reported for Android-specific null pointer dereference situations.

Example 1

     protected void onCreate(Bundle bundle) {
         final ImageView image = (ImageView) findViewById(;
         final String title = bundle.getString(TITLE);

ANDROID.NPE is reported for line 22 since 'bundle' might be null in the 'onCreate()' method due to the contract.

Security training

Application security training materials provided by Secure Code Warrior.


This checker can be extended through the Klocwork knowledge base. See Tuning Java analysis for more information.