I'm building an app that uses json data from a server that changes everyday. Yesterday it worked perfectly. Today, however, i get the following error:
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at this line(s) of code:
if(!endDate.equals("") && !endDate.equals(null) && !endDate.equals("null")) {
dates.append(" t/m ").append(endDate);
}
To me it seems that the if statement should avoid the nullpointer exception... Do i miss something?