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

(dc spec) connect and disconnect methods should specify that they may block

    Details

    • Subcomponent:
    • Resolved In Build:
      b24
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description

      FULL PRODUCT VERSION :


      A DESCRIPTION OF THE PROBLEM :
      while the documentation of other methods of this class mentions if the respective method may block,
      the docu for disconnect() does not mention it at all, and it even states:
      "If this channel's socket is not connected, or if the channel is closed, then invoking this method has no effect."
      which is not true if one considers blocking as an effect, which i think most people would.

      http://docs.oracle.com/javase/8/docs/api/java/nio/channels/DatagramChannel.html#disconnect--


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      junit test: https://gist.github.com/hoijui/e77f5d276b6b3c29b123
      ---------- END SOURCE ----------

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bpb Brian Burkhalter
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: