Menu

#8 Error in org.gbif.datatester.tests.GeographicErrorTest

open
nobody
General (4)
5
2006-09-14
2006-09-14
No

line 443:

if (mappedFeature.equals(null)){ // marine

The String.equals javadoc reads:

> Compares this string to the specified object. The
> result is true if and only if the argument is not
null > and is a String object that represents the same
> sequence of characters as this object.

So comparing any string to null will always return
false. Furthermore, attempting this code throws a
NullPointerException when mappedFeature is null.

Discussion

MongoDB Logo MongoDB