[
https://issues.apache.org/jira/browse/LANG-633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Yandell closed LANG-633.
------------------------------
Fix Version/s: 3.0
Resolution: Fixed
Code refactored:
svn ci -m "Refactoring toBoolean(String) and toBooleanObject(String) so that
the latter has the same optimizations. I did this by pointing the former to the
latter. I had to rewrite the optimizations a bit so they didn't auto-return as
the latter considers null and false to be different. I also had to add specific
support for false, no and off for the same reason. LANG-633"
Sending src/main/java/org/apache/commons/lang3/BooleanUtils.java
Sending src/test/java/org/apache/commons/lang3/BooleanUtilsTest.java
Transmitting file data ..
Committed revision 965963.
> Use same optimization in toBooleanObject(String) as in toBoolean(String str)
> ----------------------------------------------------------------------------
>
> Key: LANG-633
> URL: https://issues.apache.org/jira/browse/LANG-633
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Affects Versions: 2.5, 3.0, 3.1
> Reporter: Maxx
> Priority: Minor
> Fix For: 3.0
>
>
> Regarding optimization made in this method:
> public static boolean toBoolean(String str)
> in order to speed up the execution, why not use the same optimization in this
> method:
> public static Boolean toBooleanObject(String str)
> Note: the parameter is the same, only the output changes (from true/false to
> Boolean.TRUE/Boolean.FALSE/null)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.