
12 Feb
2010
12 Feb
'10
9 p.m.
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
After the commit it's working! The speed improvements are great (I usually create maps using only very few tags). WanMil