jpountz commented on a change in pull request #1252: LUCENE-9218: XYGeometries
should expose values as floats
URL: https://github.com/apache/lucene-solr/pull/1252#discussion_r379314365
##########
File path: lucene/core/src/java/org/apache/lucene/geo/XYEncodingUtils.java
##########
@@ -33,11 +33,12 @@
private XYEncodingUtils() {
}
- /** validates value is within +/-{@link Float#MAX_VALUE} coordinate bounds */
- public static void checkVal(double x) {
- if (Double.isNaN(x) || x < MIN_VAL_INCL || x > MAX_VAL_INCL) {
+ /** validates value is a number and finite */
+ static float checkVal(float x) {
+ if (Float.isNaN(x) || Float.isInfinite(x)) {
Review comment:
This could be a single test.
```suggestion
if (Float.isFinite(x) == false) {
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]