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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
      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

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: