From dev-return-39531-apmail-harmony-dev-archive=harmony.apache.org@harmony.apache.org Thu Jul 15 08:42:30 2010 Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 47934 invoked from network); 15 Jul 2010 08:42:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Jul 2010 08:42:30 -0000 Received: (qmail 26246 invoked by uid 500); 15 Jul 2010 08:42:29 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 25854 invoked by uid 500); 15 Jul 2010 08:42:27 -0000 Mailing-List: contact dev-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 dev@harmony.apache.org Received: (qmail 25839 invoked by uid 99); 15 Jul 2010 08:42:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 08:42:26 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chancedream@gmail.com designates 209.85.212.49 as permitted sender) Received: from [209.85.212.49] (HELO mail-vw0-f49.google.com) (209.85.212.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jul 2010 08:42:17 +0000 Received: by vws8 with SMTP id 8so1010193vws.36 for ; Thu, 15 Jul 2010 01:40:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=joo71KFKt2GVhuVYY12i0HjWQWHfl1klOoKjO4F0sN4=; b=cWtFaikb2nPh8M/9cIH4a4rktWP239WSKzT5fSMpmO1NritUNIi7kVy8+ZAvEQaMdm GfdbH9nHv2XrbJVI8dK16vxlnnIPpIRrF1pydrC3fDOkFHGnwdr7FqSO/Hxx/XyEfGaH dJLmgFi8JP19SO6Fw/4a9ySX3dcwcF5FSETkw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=kn/Ylri24hu81ssXSqs3cjnfW7TGhEYvH+DGuiGdfxDlxnocmIJdiglyQFwdIz4G0M 9S7v0dd0WsyKmpFRpIVRNl1cREA5xbaK3OH3hgNO4+r1WBe69CcLpeSCErfid9dKcxqv u/hWmd70R0Quj9HFFNK83V/oJqHHi/95gTfO8= MIME-Version: 1.0 Received: by 10.224.122.234 with SMTP id m42mr7798451qar.235.1279183256230; Thu, 15 Jul 2010 01:40:56 -0700 (PDT) Received: by 10.229.98.17 with HTTP; Thu, 15 Jul 2010 01:40:56 -0700 (PDT) In-Reply-To: <4C3EBD8D.4020606@gmail.com> References: <19865468.392031279175930743.JavaMail.jira@thor> <4C3EBD8D.4020606@gmail.com> Date: Thu, 15 Jul 2010 16:40:56 +0800 Message-ID: Subject: Re: [jira] Updated: (HARMONY-6584) [classlib][nio]SocketChannel should throw AsynchronousCloseException if the channel is closed in another thread From: chance dream To: dev@harmony.apache.org Content-Type: multipart/alternative; boundary=00c09f89939b972664048b690f48 X-Virus-Checked: Checked by ClamAV on apache.org --00c09f89939b972664048b690f48 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Ray, It seems that we are fixing the same problem :) On Thu, Jul 15, 2010 at 3:49 PM, Ray Chen wrote: > On 07/15/2010 02:38 PM, Shi Jun Zhang (JIRA) wrote: > >> [ >> https://issues.apache.org/jira/browse/HARMONY-6584?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel] >> >> Shi Jun Zhang updated HARMONY-6584: >> ----------------------------------- >> >> Attachment: HARMONY-6584.diff >> >> The patch contains the fix and the test case. Because >> Java_org_apache_harmony_luni_platform_OSNetworkSystem_readDirect() metho= d is >> invoked in lots of places, we cannot simply throw the >> AsynchronousCloseException. I throw a SocketException with "Asyn Close" >> message then catch this in SocketChannelImpl.java and throw an >> AsynchronousCloseException. >> The test case is just closing the socket channel in another thread while >> it is still reading in the main thread. >> >> >> >>> [classlib][nio]SocketChannel should throw AsynchronousCloseException if >>> the channel is closed in another thread >>> >>> -----------------------------------------------------------------------= ---------------------------------------- >>> >>> Key: HARMONY-6584 >>> URL: https://issues.apache.org/jira/browse/HARMONY-6584 >>> Project: Harmony >>> Issue Type: Bug >>> Components: Classlib >>> Affects Versions: 5.0M14 >>> Environment: all >>> Reporter: Shi Jun Zhang >>> Priority: Minor >>> Fix For: 5.0M15 >>> >>> Attachments: HARMONY-6584.diff >>> >>> >>> According to Java spec, if a SocketChannel is closed in another thread >>> while it is reading, it should throw an AsynchronousCloseException. But >>> harmony doesn't implement this. >>> >>> >> >> > Hi Chance, > Would you please take a look at JIRA-6473, are they same one? > --=20 =E5=BC=A0=E6=97=B6=E9=AA=8F --00c09f89939b972664048b690f48--