Top "Nullpointerexception" questions

The Java exception thrown when an application attempts to use null in a case where an object is required.

Java code evaluation (IntelliJ IDE), use toString() in some point?

When evaluating object initialization, toString nullPointerException appear. Method threw 'java.lang.NullPointerException' exception. Cannot evaluate XXXX.toString() Code example which …

java intellij-idea nullpointerexception
java.util.concurrent.ExecutionException: java.lang.NullPointerException Error

The following code snippet doesnt throw any error when executed in a standalone mode. When I deploy this into a …

java nullpointerexception callable
getActionBar() returns Null (AppCompat-v7 21)

My app is crashing the minute I run it after I changed my AppCompat-v7 to 21.0.0 and Compiled with no problem. …

android nullpointerexception android-appcompat
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

I have BitmapScalingHelper.java: public class BitmapScalingHelper { public static Bitmap decodeResource(Resources res, int resId, int dstWidth, int dstHeight) { Options …

android android-activity nullpointerexception android-bitmap
Exception-" java.lang.NullPointerException: Module 'null' not found " in Java-Struts 1.3

While deplyoing Struts 1.3 Login application on localhost 8080 (Apache Tomcat 6.0.16 Server). I am getting following error. HTTP Status 500 - type Exception …

java nullpointerexception struts-1
Null pointer error with hideSoftInputFromWindow

I get a null pointer exception at this row: public void hideKeyboard(){ InputMethodManager inputManager = (InputMethodManager) this.getSystemService(Context.INPUT_METHOD_…

android nullpointerexception
Java: How to check for null pointers efficiently

There are some patterns for checking whether a parameter to a method has been given a null value. First, the …

java optimization coding-style nullpointerexception
Why comparing Integer with int can throw NullPointerException in Java?

It was very confusing to me to observe this situation: Integer i = null; String str = null; if (i == null) { //Nothing …

java nullpointerexception boxing
java.lang.Class java.lang.Object.getClass()' on a null object reference

I try to use viewPager with the tablayout but when i set adapter with the view pager i'm getting error "…

android xml nullpointerexception android-viewpager
Catching exceptions thrown from native code running on Android

The project I'm currently working on requires me to code up the android portion of a cross platform program implementation. …

android exception-handling java-native-interface android-ndk nullpointerexception