Commons Digester
  1. Commons Digester
  2. DIGESTER-111

Null InputStream leads to MalformedURLExceptions under JDK 1.5

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8
    • Fix Version/s: 1.8.1, 2.0
    • Labels:
      None

      Description

      Passing a null InputStream to Digester.parse(InputStream) causes a confusing java.net.MalformedURLException under JDK 1.5

      Would be more user friendly to trap this condition and throw an appropriate exception and message.

      This came up as an issue in Commons Validator - see VALIDATOR-226

        Activity

        Hide
        Rahul Akolkar added a comment -

        Of the 6 Digester#parse() methods, 3 threw NPEs and 3 threw MalformedURLExceptions. Now all consistently throw IllegalArgumentExceptions with suitable error messages.

        Fixed in r728879:

        http://svn.apache.org/viewvc?view=rev&revision=728879

        Show
        Rahul Akolkar added a comment - Of the 6 Digester#parse() methods, 3 threw NPEs and 3 threw MalformedURLExceptions. Now all consistently throw IllegalArgumentExceptions with suitable error messages. Fixed in r728879: http://svn.apache.org/viewvc?view=rev&revision=728879

          People

          • Assignee:
            Unassigned
            Reporter:
            Niall Pemberton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development