DatagramSocket ctor spec and ::getLocalAddress spec are mismatching

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 15
    • Component/s: core-libs

      DatagramSocket()

      "Constructs a datagram socket and binds it to any available port on the local host machine . The socket will be bound to the wildcard address, an IP address chosen by the kernel"

      ::getLocalAddress()
      "Returns: or an InetAddress representing wildcard address if either the socket is not bound, or the security manager checkConnect method does not allow the operation"

      As the constructor spec says - the socket IS bound and calling ::getLocalAddress()::isAnyLocalAddress() hints that it's really a wildcard address.

      ::getLocalAddress() spec deserves correction/clarification/update.

            Assignee:
            Patrick Concannon (Inactive)
            Reporter:
            Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: