Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-436

Improper JavaDoc comment for FilenameUtils.indexOfExtension

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.4
    • 2.5
    • Utilities

    Description

      The method FilenameUtils.indexOfExtension contains this JavaDoc comment:

      * @param filename the filename to find the last path separator in, null returns -1
      * @return the index of the last separator character, or -1 if there
      * is no such character

      This comment was obviously copied from the FilenameUtils.indexOfLastSeparator method, where it makes perfect sense.

      The JavaDoc comment for FilenameUtils.indexOfExtension should rather read e.g. as follows:

      * @param filename the filename to find the last extension separator in, null returns -1
      * @return the index of the last extension separator character, or -1 if there
      * is no such character

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ggregory Gary D. Gregory
            christoph.schneegans Christoph Schneegans
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment