Top "Nullpointerexception" questions

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

How do I get @ParametersAreNonnullByDefault to work?

I've made several attempts at getting package annotation @ParametersAreNonnullByDefault to work for me in a maven project but with no …

java maven annotations nullpointerexception findbugs
Boolean.valueOf() produces NullPointerException sometimes

I have this code: package tests; import java.util.Hashtable; public class Tests { public static void main(String[] args) { Hashtable&…

java nullpointerexception boolean
Why getActionBar() getting null value in TabHost from Android?

I am trying to write a code in Android , to hide the Actionbar during scroll down event. I have a …

android nullpointerexception android-actionbar android-tabactivity
Spring MockMvc test: Null pointer Exception

I'm following tutorials for integrating Spring docs into my project but i'm running into nullpointerexception when I run my test. …

spring-mvc nullpointerexception mockmvc spring-restdocs
PreferenceFragment.findPreference always returns NULL

I'm currently trying to make a settings menu, that will show a MultiSelectListPreference, to select multiple contacts from your contact …

java android nullpointerexception android-preferences multi-select
Android: NullPointerException on getWritableDatabase()

Here is where I try to access the database: UserDataAdapter dbHelper = new UserDataAdapter(this); dbHelper.open(); dbHelper.createNetwork(network); dbHelper.…

android sqlite nullpointerexception android-2.2-froyo android-sdk-2.1
How to avoid checking for null values in method chaining?

I need to check if some value is null or not. And if its not null then just set some …

java exception-handling nullpointerexception
Getting Exception in thread "main" java.lang.NullPointerException error

I am writing a small java code to generate random values: import java.util.Random; public class Rann { static Random …

java nullpointerexception lejos-nxj
getDrawable returning null

Since i've busted my last question regarding this matter due to posting a different code from the one regarding the …

android resources nullpointerexception getresource
Scala Check optional string is null or empty

I am a newbie to Scala and I want to learn how can I add null and empty check on …

java scala nullpointerexception functional-programming isnull