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

        Niall Pemberton created issue -
        Henri Yandell made changes -
        Field Original Value New Value
        Fix Version/s 1.8.1 [ 12312580 ]
        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
        Rahul Akolkar made changes -
        Fix Version/s 2.0 [ 12313572 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rahul Akolkar made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        665d 12h 28m 1 Rahul Akolkar 23/Dec/08 05:46
        Resolved Resolved Closed Closed
        13d 10h 24m 1 Rahul Akolkar 05/Jan/09 16:10

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development