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

(dc) DatagramChannel socket adaptor issues

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b22
    • Verification:
      Verified

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: