Fix typo in GeoUtils#isValidLongitude (#25121)

GeoUtils#isValidLongitude is inconsistent with GeoUtils#isValidLatitude. 
Neither technically need the isInfinite() check because they then compare 
against min and max values.
This commit is contained in:
Eli Skeggs 2017-06-08 08:23:22 -07:00 committed by Christoph Büscher
parent a0afa917ac
commit ee0e921643
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public class GeoUtils {
/** Returns true if longitude is actually a valid longitude value. */
public static boolean isValidLongitude(double longitude) {
if (Double.isNaN(longitude) || Double.isNaN(longitude) || longitude < GeoUtils.MIN_LON || longitude > GeoUtils.MAX_LON) {
if (Double.isNaN(longitude) || Double.isInfinite(longitude) || longitude < GeoUtils.MIN_LON || longitude > GeoUtils.MAX_LON) {
return false;
}
return true;