﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5501	NPE in measurement plugin when selecting way with missing node	AlfonZ	team	"Open attached missingnode.osm, Select all.

The reason is that a way is referencing a node which is not present in the file.
The way and nodes have to have positive IDs, otherwise JOSM refuses to open the file (with message ""Way ... includes missing node ..."").
Although the file itself is forged, I got it when I (incorrectly) filtered out stuff from a correct file.

{{{
Build-Date: 2010-09-24 14:22:14
Revision: 3560
Is-Local-Build: true

Identification: JOSM/1.5 (3560 SVN en)
Memory Usage: 49 MB / 247 MB (14 MB allocated, but free)
Java version: 1.6.0_21, Sun Microsystems Inc., Java HotSpot(TM) Client VM
Operating system: Windows XP
Dataset consistency test: No problems found

Plugin: measurement (22547)

java.lang.NullPointerException
	at org.openstreetmap.josm.plugins.measurement.MeasurementLayer.calcDistance(MeasurementLayer.java:152)
	at org.openstreetmap.josm.plugins.measurement.MeasurementDialog$1.selectionChanged(MeasurementDialog.java:128)
	at org.openstreetmap.josm.data.osm.DataSet.fireSelectionChanged(DataSet.java:330)
	at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:444)
	at org.openstreetmap.josm.data.osm.DataSet.setSelected(DataSet.java:455)
	at org.openstreetmap.josm.actions.SelectAllAction.actionPerformed(SelectAllAction.java:23)
...
}}}
"	defect	closed	normal		Plugin measurement	latest	worksforme		
