Dear Lucene Developers,

In the source file "GeohashFunction.java", the code fragment that is used
for comparing latitude and longtitude has been reported for wrong
comparison by some users who are writing similar codes.

Original Code
--------------------
    if (!lat.equals(that.lat)) return false;
    if (!lon.equals(that.lon)) return false;

    return true;

Since other users that are using very similar codes as above have
encountered this issue, it is therefore better to prevent it from occurring.

Simply trim the whitespaces by just modifying two lines. The amended code
will be:

Changed Code
----------------------
    if (!lat.trim().equals(that.lat)) return false;
    if (!lon.trim().equals(that.lon)) return false;

    return true;

Reference: http://stackoverflow.com/questions/11219845/

Please consider adding this minor change.

Thanks!

-- 
Warmest Regards,
    Fuxiang

Reply via email to