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 Bug
    • Status: Resolved
    • Priority: Trivial 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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development