Github user greghogan commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4305#discussion_r127109325
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java ---
    @@ -843,11 +843,14 @@ private float convertToFloat(Object o, float 
defaultValue) {
                }
                else if (o.getClass() == Double.class) {
                        double value = ((Double) o);
    -                   if (value <= Float.MAX_VALUE && value >= 
Float.MIN_VALUE) {
    -                           return (float) value;
    -                   } else {
    +                   if (value < -Float.MAX_VALUE
    --- End diff --
    
    I stand corrected. Why not use three checks instead of four (five 
comparisons instead of six) with the additional equality check with `0`?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to