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

Socket class - javadoc not sufficiently explicit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.4.2
    • core-libs
    • x86
    • linux

      FULL PRODUCT VERSION :


      ADDITIONAL OS VERSION INFORMATION :
      n/a - documentation issue

      A DESCRIPTION OF THE PROBLEM :
      People new to sockets often get this wrong..


      bool Socket.isConnected()
      what the javadoc should say:
      Initially this method returns false. After a connection is established, this method method returns true. It will never change back to false for any reason (like the connection failing).

      bool Socket.isClosed()
      what the javadoc should say:
      Initially this method returns false. After Socket.close() is invoked this method returns true. It will not return true for any other reason (like the connection being closed by the remote end).


      REPRODUCIBILITY :
      This bug can be reproduced always.

            jccollet Jean-Christophe Collet (Inactive)
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: