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-4665) Remove boxing/unboxing to parse a primitive
Date Fri, 23 Sep 2016 10:33:20 GMT

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

ASF GitHub Bot commented on FLINK-4665:

Github user StephanEwen commented on the issue:

    Thanks for that cleanup. I like it have the code be conscious about object creation and
    Merging this...

> Remove boxing/unboxing to parse a primitive
> -------------------------------------------
>                 Key: FLINK-4665
>                 URL: https://issues.apache.org/jira/browse/FLINK-4665
>             Project: Flink
>          Issue Type: Bug
>          Components: Java API
>            Reporter: Alexander Pivovarov
>            Priority: Trivial
> I found the following issues with boxing/unboxing and Integer
> 1. Current code doing boxing/unboxing to parse a primitive - It is more efficient to
just call the static parseXXX method.
> 2. boxing/unboxing to do type cast
> 3. new Integer instead of valueOf - Using new Integer(int) is guaranteed to always result
in a new object whereas Integer.valueOf(int) allows caching of values to be done by the compiler.

This message was sent by Atlassian JIRA

View raw message