You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Hideyuki Suzumi (JIRA)" <ji...@apache.org> on 2008/06/10 10:25:45 UTC
[jira] Created: (LANG-444) StringUtils.emptyToNull
StringUtils.emptyToNull
-----------------------
Key: LANG-444
URL: https://issues.apache.org/jira/browse/LANG-444
Project: Commons Lang
Issue Type: New Feature
Affects Versions: 2.4
Reporter: Hideyuki Suzumi
Priority: Minor
Inversion of StringUtils.defaultString(String).
StringUtils.emptyToNull(null) = null
StringUtils.emptyToNull("") = null
StringUtils.emptyToNull("bat") = "bat"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-444) StringUtils.emptyToNull
Posted by "Robert Scholte (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603811#action_12603811 ]
Robert Scholte commented on LANG-444:
-------------------------------------
Looks a lot like StringUtils.stripToNull(aString). Are you sure you're looking for something else?
> StringUtils.emptyToNull
> -----------------------
>
> Key: LANG-444
> URL: https://issues.apache.org/jira/browse/LANG-444
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.4
> Reporter: Hideyuki Suzumi
> Priority: Minor
>
> Inversion of StringUtils.defaultString(String).
> StringUtils.emptyToNull(null) = null
> StringUtils.emptyToNull("") = null
> StringUtils.emptyToNull("bat") = "bat"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-444) StringUtils.emptyToNull
Posted by "Hideyuki Suzumi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604176#action_12604176 ]
Hideyuki Suzumi commented on LANG-444:
--------------------------------------
I did not notice it.
If it is possible, I hope for a more comprehensible method.
Thanks.
> StringUtils.emptyToNull
> -----------------------
>
> Key: LANG-444
> URL: https://issues.apache.org/jira/browse/LANG-444
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.4
> Reporter: Hideyuki Suzumi
> Priority: Minor
>
> Inversion of StringUtils.defaultString(String).
> StringUtils.emptyToNull(null) = null
> StringUtils.emptyToNull("") = null
> StringUtils.emptyToNull("bat") = "bat"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-444) StringUtils.emptyToNull
Posted by "Hideyuki Suzumi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604086#action_12604086 ]
Hideyuki Suzumi commented on LANG-444:
--------------------------------------
Yes, I do not want to strip it.
> StringUtils.emptyToNull
> -----------------------
>
> Key: LANG-444
> URL: https://issues.apache.org/jira/browse/LANG-444
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.4
> Reporter: Hideyuki Suzumi
> Priority: Minor
>
> Inversion of StringUtils.defaultString(String).
> StringUtils.emptyToNull(null) = null
> StringUtils.emptyToNull("") = null
> StringUtils.emptyToNull("bat") = "bat"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (LANG-444) StringUtils.emptyToNull
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell closed LANG-444.
------------------------------
Resolution: Fixed
Fix Version/s: 3.0
svn ci -m "Added javadoc to show that LANG-444 can be implemented by defaultIfEmpty, and proved it in the unit test"
Sending src/java/org/apache/commons/lang/StringUtils.java
Sending src/test/org/apache/commons/lang/StringUtilsTest.java
Transmitting file data ..
Committed revision 672995.
> StringUtils.emptyToNull
> -----------------------
>
> Key: LANG-444
> URL: https://issues.apache.org/jira/browse/LANG-444
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.4
> Reporter: Hideyuki Suzumi
> Priority: Minor
> Fix For: 3.0
>
>
> Inversion of StringUtils.defaultString(String).
> StringUtils.emptyToNull(null) = null
> StringUtils.emptyToNull("") = null
> StringUtils.emptyToNull("bat") = "bat"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-444) StringUtils.emptyToNull
Posted by "Robert Scholte (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604141#action_12604141 ]
Robert Scholte commented on LANG-444:
-------------------------------------
You can always use StringUtils.defaultIfEmpty(aString, null). The javadoc doesn't give an example when using null as second argument, but that should do the trick.
> StringUtils.emptyToNull
> -----------------------
>
> Key: LANG-444
> URL: https://issues.apache.org/jira/browse/LANG-444
> Project: Commons Lang
> Issue Type: New Feature
> Affects Versions: 2.4
> Reporter: Hideyuki Suzumi
> Priority: Minor
>
> Inversion of StringUtils.defaultString(String).
> StringUtils.emptyToNull(null) = null
> StringUtils.emptyToNull("") = null
> StringUtils.emptyToNull("bat") = "bat"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.