[OSM-dev] Josm throwing exceptions when predicting values

Martijn van Oosterhout kleptog at gmail.com
Mon May 28 12:16:19 BST 2007


On 5/28/07, John McKerrell <john at mckerrell.net> wrote:
> Path: josm
> URL: http://www.eigenheimstrasse.de/svn/josm
> Repository Root: http://www.eigenheimstrasse.de/svn/josm
> Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
> Revision: 247
> Node Kind: directory
> Last Changed Author: framm
> Last Changed Rev: 247
> Last Changed Date: 2007-05-24 22:55:15 +0200 (Thu, 24 May 2007)
>
>
> java.lang.NullPointerException
>         at java.util.Vector.<init>(Vector.java:149)
>         at org.openstreetmap.josm.gui.dialogs.PropertiesDialog
> $3.actionPerformed(PropertiesDialog.java:210)

This is the culprit. Looks like you're right, if you add a key that
hasn't been used before, it's going to throw an exception:

   Vector<String> newValues = new Vector<String>(allData.get(key));

Frederik is the guy to talk to about this, I've CCed him here. The fix
would be to check if a null is returned an in that case do nothing.

Have a nice day,
-- 
Martijn van Oosterhout <kleptog at gmail.com> http://svana.org/kleptog/




More information about the dev mailing list