Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8356395

Spec needs to be clarified for InterfaceAddress.getBroadcast() method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs
    • None
    • generic
    • generic

      Currently spec says:

      -------------------------------------------------------------------------------
      public InetAddress getBroadcast()

          Returns an InetAddress for the brodcast address for this InterfaceAddress.

          Only IPv4 networks have broadcast address therefore, in the case of an IPv6 network, null will be returned.

          Returns:
              the InetAddress representing the broadcast address or null if there is no broadcast address.
      -------------------------------------------------------------------------------

      So it looks like non-null value must be returned for IPv4 network.

      However null is returned is InterfaceAdrress instance represents IPv4 loopback address

      Spec should be clarified to legalize such behavior

            kfarrell Kieran Farrell
            kfarrell Kieran Farrell
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: