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

(dc) DatagramChannel socket adaptor issues

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 14
    • core-libs
    • b22
    • Verified

      There are several socket adaptor issues that should be fixed:

      1. The socket adaptor send method blocks when another thread is blocked in receive.

      2. The send/receive methods create a ByteBuffer for each I/O operation.

      3. DatagramPacket has issues (under discussion in JDK-8232817) that may require workarounds in the receive method.

      4. The connect method fails if already connected.

      5. DatagramSocket connect(SocketAddress) and connect(InetAddress, int) specify IAE is thrown when the address is null, the adaptor throws NPE.

      6. DatagramSocket getLocalSocketAddress specifies that null is returned when the socket is closed but the adaptor returns the local address (if bound before the socket was closed).

      Maybe for another issue but this area needs more complete tests to ensure that the adaptor behaves the same as DatagramSocket for bad input and closed socket cases.

            alanb Alan Bateman
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: