Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-424

Improve Javadoc for StringUtils class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4
    • 3.0
    • lang.*
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rowdyrabbit Denise Fernandez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: