flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-4594) Validate lower bound in MathUtils.checkedDownCast
Date Tue, 20 Sep 2016 14:14:20 GMT

    [ https://issues.apache.org/jira/browse/FLINK-4594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15506666#comment-15506666
] 

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)

Mime
View raw message