[osmosis-dev] Osmosis and empty roles

Brett Henderson brett at bretth.com
Mon Nov 9 22:00:21 GMT 2009


marcus.wolschon at googlemail.com wrote:
> Hello Brett,
>
> I found that some http-based services return relation-members with no
> "role"-tag if it's empty.
> Osmosis would parse these and create a null role without complaining.
> Later this causes all kinds of problems as the role-attribute is not
> supposed to ever be null.
>   
I did see something on the lists about this but hadn't had a chance to 
investigate.
> I added a check in the constructor of RelationMember to disallow
> the creation of such members in the first place and patched
> the RelationMemberEntityHandler to threat a missing "role"-tag
> as an empty role.
>   
Great, sounds perfect.
> This seems to fix the issue with the NullPointerException that
> makes osmosis create invalid osc-files.
>   
Cool.  Thanks for this!

Brett





More information about the osmosis-dev mailing list