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

FileUtils.toURLs throws NPE for null parameter; this is inconsistent with toFiles method behaviour

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 2.4
    • None
    • None

    Description

      The toFiles method treats null input the same as an empty array, however the toURLs method throws NPE for null input.

      This is inconsistent.

      The Javadoc for toURLs does not specify the behaviour for null input.

      Either the method should be fixed to treat null as an empty array, or the NPE should be documented.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: