jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (JCR-1424) [PATCH] simplify conversion of strings to primitives by using parseXXX, not valueOf(xxx).xxxValue()
Date Wed, 27 Feb 2008 11:17:51 GMT

    [ https://issues.apache.org/jira/browse/JCR-1424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572874#action_12572874
] 

Jukka Zitting commented on JCR-1424:
------------------------------------

> However I didn't know that some JVMs can optimize away duplicate objects automatically.
> Do you have more information about that?

See the Escape analysis section in http://www-128.ibm.com/developerworks/java/library/j-jtp09275.html

> [PATCH] simplify conversion of strings to primitives by using parseXXX, not valueOf(xxx).xxxValue()
> ---------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1424
>                 URL: https://issues.apache.org/jira/browse/JCR-1424
>             Project: Jackrabbit
>          Issue Type: Improvement
>          Components: jackrabbit-core
>            Reporter: Dave Brosius
>            Priority: Trivial
>             Fix For: 1.5
>
>         Attachments: simplify_string_to_primitive.patch, simplify_string_to_primitive.patch
>
>
> Code converts strings to primitives using a two step process, eg
> Boolean.valueOf(myString).booleanValue();
> can be simplified to 
> Boolean.parseBoolean(myString);
> true of Float, Double, Int etc. 
> In some cases, this avoids allocating temporary boxed objects
> patch fixes this.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message