[ https://issues.apache.org/jira/browse/FLINK-4665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15515279#comment-15515279 ]
ASF GitHub Bot commented on FLINK-4665: --------------------------------------- GitHub user apivovarov opened a pull request: https://github.com/apache/flink/pull/2537 [FLINK-4665] Remove boxing/unboxing to parse a primitive https://issues.apache.org/jira/browse/FLINK-4665 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apivovarov/flink FLINK-4665 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/flink/pull/2537.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 #2537 ---- commit eeefde68405d27a828d15443b5815a4e53a6b34c Author: Alexander Pivovarov <apivova...@gmail.com> Date: 2016-09-23T03:27:08Z [FLINK-4665] Remove boxing/unboxing to parse a primitive ---- > 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 (v6.3.4#6332)