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:
parent
a0afa917ac
commit
ee0e921643
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue