AnsweredAssumed Answered

GeoLocationProvider bug (error field)

Question asked by Santosh MS on May 9, 2015
Latest reply on May 15, 2015 by Santosh MS

The GeoLocationProvider expects an error field tries to parse the value as a Double.

 

https://github.com/igniterealtime/Smack/blob/master/smack-extensions/src/main/ja va/org/jivesoftware/smackx/geoloc/provider/GeoLocationProvider.java#L71

 

The GeoLocation constructor sets this to null incase the accuracy field is set

Smack/GeoLocation.java at master · igniterealtime/Smack · GitHub

 

Issues

1) The parser throws an exception when parsing a geolocation message due to the error field being null

2) Why does the parser need all the fields to be defined. There are so many fields of type double and all need to be defined. The GeoLocation builder doesn't mandate all the fields, but the parser does. Ideally parser should parse a GeoLocation message with any of the fields set, and should be tolerant of missing fields

Outcomes