Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 64543 invoked from network); 15 Jun 2010 12:05:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jun 2010 12:05:50 -0000 Received: (qmail 60393 invoked by uid 500); 15 Jun 2010 12:05:50 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 60283 invoked by uid 500); 15 Jun 2010 12:05:48 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 60271 invoked by uid 99); 15 Jun 2010 12:05:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 12:05:47 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jun 2010 12:05:45 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o5FC5NOv009260 for ; Tue, 15 Jun 2010 12:05:23 GMT Message-ID: <21510720.4901276603523556.JavaMail.jira@thor> Date: Tue, 15 Jun 2010 08:05:23 -0400 (EDT) From: "Catherine Hope (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-6554) [classlib][luni] Socket.isClosed() returns false after Socket.getInputStream().close() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [classlib][luni] Socket.isClosed() returns false after Socket.getInputStream().close() -------------------------------------------------------------------------------------- Key: HARMONY-6554 URL: https://issues.apache.org/jira/browse/HARMONY-6554 Project: Harmony Issue Type: Bug Reporter: Catherine Hope Priority: Minor Closing a socket via its input or output stream does not update the isClosed state variable of the Socket object so calling isClosed() will return true instead of false. This doesn't occur on the RI. The SocketInput/OutputStream classes are constructed with a SocketImpl subclass, and don't have access to the fields of Socket, so I think the Socket.isClosed() method may need to do more work to check the socket state that just returning its local state. ServerSocket server = new ServerSocket(0); Socket client = new Socket(); client.connect(server.getLocalSocketAddress()); server.accept(); client.getInputStream().close(); // and the same for getOutputStream() assertTrue(client.isClosed()); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.