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

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

XMLWordPrintable

    • b24
    • generic
    • generic
    • Not verified

      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 ----------

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

              Created:
              Updated:
              Resolved: