Apache AWF
  1. Apache AWF
  2. AWF-77

AsynchronousHttpClient.fetch(..) "leaks" IllegalArgumentException if port is out of range

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Labels:
      None

      Description

      Exception in thread "I/O-LOOP" java.lang.IllegalArgumentException: port out of range:80811
      Its because we create an java.net.InetSocketAddress..

      doc for ISA:
      IllegalArgumentException - if the port parameter is outside the range of valid port values, or if the hostname parameter is null.

        Activity

        Hide
        Roger Schildmeijer added a comment -

        +1

        Show
        Roger Schildmeijer added a comment - +1
        Hide
        Johnathan Meehan added a comment -

        Committed: http://svn.apache.org/viewvc?rev=1158408&view=rev

        Reverted revision 1154415 for the affected types, and added documentation to the public methods instead. Please review.

        Show
        Johnathan Meehan added a comment - Committed: http://svn.apache.org/viewvc?rev=1158408&view=rev Reverted revision 1154415 for the affected types, and added documentation to the public methods instead. Please review.
        Hide
        Roger Schildmeijer added a comment -

        +1 for that behaviour

        Show
        Roger Schildmeijer added a comment - +1 for that behaviour
        Hide
        Johnathan Meehan added a comment -

        I think so; the behaviour is now potentially quite confusing as we might retrieve something entirely unexpected. If the caller is making this kind of mistake, we should probably just let him know. Perhaps it's enough to document the thrown exception for the affected methods?

        Show
        Johnathan Meehan added a comment - I think so; the behaviour is now potentially quite confusing as we might retrieve something entirely unexpected. If the caller is making this kind of mistake, we should probably just let him know. Perhaps it's enough to document the thrown exception for the affected methods?
        Hide
        Roger Schildmeijer added a comment -

        Maybe its ok (and the preferred way) to expose the third party dev. to the IllegalArgumentException?

        Show
        Roger Schildmeijer added a comment - Maybe its ok (and the preferred way) to expose the third party dev. to the IllegalArgumentException?
        Hide
        Johnathan Meehan added a comment -

        Looking at this again today, wondering if it should not be reverted.

        Show
        Johnathan Meehan added a comment - Looking at this again today, wondering if it should not be reverted.
        Hide
        Johnathan Meehan added a comment -

        Ready for review.

        Show
        Johnathan Meehan added a comment - Ready for review.
        Hide
        Johnathan Meehan added a comment -

        Committed: http://svn.apache.org/viewvc?rev=1154415&view=rev

        Defaults to 80 when outside of range, extending upon functionality already in place. Logs warning; should be dealt with rather than silently handled.

        Show
        Johnathan Meehan added a comment - Committed: http://svn.apache.org/viewvc?rev=1154415&view=rev Defaults to 80 when outside of range, extending upon functionality already in place. Logs warning; should be dealt with rather than silently handled.

          People

          • Assignee:
            Johnathan Meehan
            Reporter:
            Niklas Gustavsson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development