Hi Uli,

yes, you are probably right.
BTW: This seems to be related to a new HashMap implementation in Java 8.
In my environtment (with Java 7), the compareTo() method is never called
which could explain why nobody else has reported the problem.

Gerd

> Date: Thu, 6 Nov 2014 00:58:06 -0800
> From: ulibaer@gmail.com
> To: mkgmap-dev@lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] NPE with mkgmap 3344!
>
> BTW:
> Since there is a check against City object being null before the compare
> method:
>
>
> // TODO: look at what this is doing...
> if(city != null && other.city != null)
> return city.getName().compareTo(other.city.getName()); <--- Here
> happens the NPE
> if (hashCode() == other.hashCode())
> return 0;
>
>
> I suspect the getName()-function from City object to return <null> in some
> cases.
> I'm @ work right now and can't explore, but i remember City.getName()
> checking for Label != <null> but then calling Label.getText(), which does
> *not* check for <null>.
>
> Best regards, Uli
>
>
>
> --
> View this message in context: http://gis.19327.n5.nabble.com/NPE-with-mkgmap-3320-tp5813472p5823349.html
> Sent from the Mkgmap Development mailing list archive at Nabble.com.
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev@lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev