MINA
  1. MINA
  2. DIRMINA-839

The AvailablePortFinder is overly complex

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.4
    • Fix Version/s: 2.0.6, 3.0.0-M1
    • Component/s: None
    • Labels:
      None

      Description

      We have a helper method that returns an availble port, doing a loop. This is probably overly complex, when a simple call to :

      new ServerSocket( 0 ).getLocalPort()

      will return the first available port.

        Activity

        Hide
        Emmanuel Lecharny added a comment -

        Considered as fixed. We could remove the method in 3.0

        Show
        Emmanuel Lecharny added a comment - Considered as fixed. We could remove the method in 3.0
        Hide
        Emmanuel Lecharny added a comment -

        A minimal modification made in 2.0.5 : http://svn.apache.org/viewvc?rev=1359088&view=rev

        Show
        Emmanuel Lecharny added a comment - A minimal modification made in 2.0.5 : http://svn.apache.org/viewvc?rev=1359088&view=rev
        Hide
        Emmanuel Lecharny added a comment -

        It's difficult to remove this class, as it may break some user's code. Right now, the only modification done is to return an available port using the new ServerSocket( 0 ).getLocalPort() method in the getNextAvailable() method.

        Show
        Emmanuel Lecharny added a comment - It's difficult to remove this class, as it may break some user's code. Right now, the only modification done is to return an available port using the new ServerSocket( 0 ).getLocalPort() method in the getNextAvailable() method.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development