You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Denise Fernandez (JIRA)" <ji...@apache.org> on 2008/04/14 08:45:05 UTC
[jira] Created: (LANG-424) Improve Javadoc for StringUtils class
Improve Javadoc for StringUtils class
-------------------------------------
Key: LANG-424
URL: https://issues.apache.org/jira/browse/LANG-424
Project: Commons Lang
Issue Type: Improvement
Affects Versions: 2.4
Reporter: Denise Fernandez
In the StringUtils class it would be helpful if in the following methods, the Javadoc is improved:
substringAfter
substringAfterLast
I think there should be better documentation in the case where the separator string is not found in the search string: It should be explicity noted that in this case an empty string will be returned.
In the following methods:
substringBefore
substringBeforeLast
It should be documented that if the separator is not found in the search string, the search string is returned.
I realise there are examples for both these cases, but I think that they should be separately and explicity documented as special cases. I had expected that substringAfterLast would return the original string if the separator was not found in it and this caused me some trouble.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (LANG-424) Improve Javadoc for StringUtils class
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell closed LANG-424.
------------------------------
Resolution: Fixed
Javadoc added. Not sure why it behaves that way, but probably not worth trying to change now.
svn ci -m "Adding javadoc per LANG-424 to point out what happens in substringLast/substringBefore methods when substring is not found" src
Sending src/java/org/apache/commons/lang/StringUtils.java
Transmitting file data .
Committed revision 749151.
> Improve Javadoc for StringUtils class
> -------------------------------------
>
> Key: LANG-424
> URL: https://issues.apache.org/jira/browse/LANG-424
> Project: Commons Lang
> Issue Type: Improvement
> Affects Versions: 2.4
> Reporter: Denise Fernandez
> Fix For: 3.0
>
>
> In the StringUtils class it would be helpful if in the following methods, the Javadoc is improved:
> substringAfter
> substringAfterLast
> I think there should be better documentation in the case where the separator string is not found in the search string: It should be explicity noted that in this case an empty string will be returned.
> In the following methods:
> substringBefore
> substringBeforeLast
> It should be documented that if the separator is not found in the search string, the search string is returned.
> I realise there are examples for both these cases, but I think that they should be separately and explicity documented as special cases. I had expected that substringAfterLast would return the original string if the separator was not found in it and this caused me some trouble.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LANG-424) Improve Javadoc for StringUtils class
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell updated LANG-424:
-------------------------------
Fix Version/s: 3.0
> Improve Javadoc for StringUtils class
> -------------------------------------
>
> Key: LANG-424
> URL: https://issues.apache.org/jira/browse/LANG-424
> Project: Commons Lang
> Issue Type: Improvement
> Affects Versions: 2.4
> Reporter: Denise Fernandez
> Fix For: 3.0
>
>
> In the StringUtils class it would be helpful if in the following methods, the Javadoc is improved:
> substringAfter
> substringAfterLast
> I think there should be better documentation in the case where the separator string is not found in the search string: It should be explicity noted that in this case an empty string will be returned.
> In the following methods:
> substringBefore
> substringBeforeLast
> It should be documented that if the separator is not found in the search string, the search string is returned.
> I realise there are examples for both these cases, but I think that they should be separately and explicity documented as special cases. I had expected that substringAfterLast would return the original string if the separator was not found in it and this caused me some trouble.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.