ANDROID.NPEA 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 117 protected void onCreate(Bundle bundle) { 18 super.onCreate(bundle); 19 setContentView(R.layout.note_layout); 20 final ImageView image = (ImageView) findViewById(R.id.image); 21 22 final String title = bundle.getString(TITLE); 23 setTitle(title); 24 } ANDROID.NPE is reported for line 22 since 'bundle' might be null in the 'onCreate()' method due to the contract. Related checkersExtensionThis checker can be extended through the Klocwork knowledge base. See Tuning Java analysis for more information. |