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

java.net.Socket should specify when underlying resources are released.

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.2
    • core-libs
    • Fix Understood
    • x86
    • windows_2000



      Name: rmT116609 Date: 02/19/2004


      A DESCRIPTION OF THE PROBLEM :
      java.net.Socket does not specify exactly when the associated resources (such as the file descriptor) are released. It is ambigous from the documentation whether once a SocketInputStream/SocketOutputStream received an IOException during read/write calls, a call to Socket.close(), SocketInputStream/SocketOutputStream.close() is necessary to free the associated resources.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Describe exactly the requested operation to clear the underlying resources, even in the case an abnormal network condition was detected.
      ACTUAL -
      There is no such description currently, and one may assume that it is not necessary to call the close() method if an IOException was thrown by read or write operation on streams.

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.4.2/docs/api/java/net/Socket.html
      (Incident Review ID: 239510)
      ======================================================================

            Unassigned Unassigned
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: