You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Ray Chen <cl...@gmail.com> on 2010/07/15 09:49:33 UTC
Re: [jira] Updated: (HARMONY-6584) [classlib][nio]SocketChannel should
throw AsynchronousCloseException if the channel is closed in another thread
On 07/15/2010 02:38 PM, Shi Jun Zhang (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/HARMONY-6584?page=com.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() method 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?
Re: [jira] Updated: (HARMONY-6584) [classlib][nio]SocketChannel
should throw AsynchronousCloseException if the channel is closed in another
thread
Posted by chance dream <ch...@gmail.com>.
Hi Ray,
It seems that we are fixing the same problem :)
On Thu, Jul 15, 2010 at 3:49 PM, Ray Chen <cl...@gmail.com> wrote:
> On 07/15/2010 02:38 PM, Shi Jun Zhang (JIRA) wrote:
>
>> [
>> https://issues.apache.org/jira/browse/HARMONY-6584?page=com.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() method 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?
>
--
张时骏