Hi,

>       @Override public final boolean equals(Object obj) {
> -             if (obj == null || getClass() != obj.getClass() || id == 0 ||  
> ((OsmPrimitive)obj).id == 0)
> +             if (obj == null || getClass() != obj.getClass())
> +                     return super.equals(obj);
> +             if (id == 0 && ((OsmPrimitive)obj).id == 0)
>                       return super.equals(obj);
>               return id == ((OsmPrimitive)obj).id;
>       }

In a case where id == 0 but obj.id != 0, the old code would have  
returned super.equals(obj), while your code returns false. I suspect  
it doesn't matter much - but was that a deliberate change and if yes,  
why?

Bye
Frederik

-- 
Frederik Ramm  ##  eMail [EMAIL PROTECTED]  ##  N49°00'09" E008°23'33"




_______________________________________________
josm-dev mailing list
[email protected]
http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/josm-dev

Reply via email to