On Thu, Feb 11, 2010 at 07:59:01PM +0100, WanMil wrote:
> The Osm5XMLHandler sometimes throw a NullPointerException in line 397.
> This is the key.equals("highway") part:
>
> if((val.equals("motorway_junction") ||
> val.equals("services")) &&
> key.equals("highway"))
> {
> exits.add(currentNode);
> currentNode.addTag("osm:id", "" + currentElementId);
> }
>
> It might be fixed by changing it to "highway".equals(key).
Right, java.lang.Object.equals(Object other) specifically says that you can
pass other=null and the result will be false. On the other hand, invoking
a method on a null reference will throw a NullPointerException.
Marko
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev