[jira] [Commented] (FLINK-4594) Validate lower bound in MathUtils.checkedDownCast
[ https://issues.apache.org/jira/browse/FLINK-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=1550#comment-1550 ] ASF GitHub Bot commented on FLINK-4594: --- Github user asfgit closed the pull request at: https://github.com/apache/flink/pull/2481 > Validate lower bound in MathUtils.checkedDownCast > - > > Key: FLINK-4594 > URL: https://issues.apache.org/jira/browse/FLINK-4594 > Project: Flink > Issue Type: Bug > Components: Core >Affects Versions: 1.2.0 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Trivial > Fix For: 1.2.0 > > > {{MathUtils.checkedDownCast}} only compares against the upper bound > {{Integer.MAX_VALUE}}, which has worked with current usage. > Rather than adding a second comparison we can replace > {noformat} > if (value > Integer.MAX_VALUE) { > {noformat} > with a cast and check > {noformat} > if ((int)value != value) { ... > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4594) Validate lower bound in MathUtils.checkedDownCast
[ https://issues.apache.org/jira/browse/FLINK-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15504429#comment-15504429 ] ASF GitHub Bot commented on FLINK-4594: --- Github user StephanEwen commented on the issue: https://github.com/apache/flink/pull/2481 Good to merge! > Validate lower bound in MathUtils.checkedDownCast > - > > Key: FLINK-4594 > URL: https://issues.apache.org/jira/browse/FLINK-4594 > Project: Flink > Issue Type: Bug > Components: Core >Affects Versions: 1.2.0 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Trivial > > {{MathUtils.checkedDownCast}} only compares against the upper bound > {{Integer.MAX_VALUE}}, which has worked with current usage. > Rather than adding a second comparison we can replace > {noformat} > if (value > Integer.MAX_VALUE) { > {noformat} > with a cast and check > {noformat} > if ((int)value != value) { ... > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (FLINK-4594) Validate lower bound in MathUtils.checkedDownCast
[ https://issues.apache.org/jira/browse/FLINK-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15474029#comment-15474029 ] ASF GitHub Bot commented on FLINK-4594: --- GitHub user greghogan opened a pull request: https://github.com/apache/flink/pull/2481 [FLINK-4594] [core] Validate lower bound in MathUtils.checkedDownCast You can merge this pull request into a Git repository by running: $ git pull https://github.com/greghogan/flink 4594_validate_lower_bound_in_mathutils_checkeddowncast Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2481.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2481 commit d273919155cfef48d807b7f93430b52944e145f4 Author: Greg Hogan Date: 2016-09-08T14:35:39Z [FLINK-4594] [core] Validate lower bound in MathUtils.checkedDownCast > Validate lower bound in MathUtils.checkedDownCast > - > > Key: FLINK-4594 > URL: https://issues.apache.org/jira/browse/FLINK-4594 > Project: Flink > Issue Type: Bug > Components: Core >Affects Versions: 1.2.0 >Reporter: Greg Hogan >Assignee: Greg Hogan >Priority: Trivial > > {{MathUtils.checkedDownCast}} only compares against the upper bound > {{Integer.MAX_VALUE}}, which has worked with current usage. > Rather than adding a second comparison we can replace > {noformat} > if (value > Integer.MAX_VALUE) { > {noformat} > with a cast and check > {noformat} > if ((int)value != value) { ... > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)