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

DatagramSocket / DatagramChannel do not specify what happens when sending to port 0

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • tbd
    • None
    • core-libs
    • None

    Description

      The behavior of DatagramSocket / DatagramChannel send method when the target address is specified to port 0 appears to be system dependent:

      on Linux / macOS: an IOException is thrown.
      on Windows / Solaris: no exception is thrown.

      Whether the spec and implementation should be changed to always throw IllegalArgumentException instead should be examined.

      Attachments

        Issue Links

          Activity

            People

              dfuchs Daniel Fuchs
              dfuchs Daniel Fuchs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: