harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shi Jun Zhang (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6584) [classlib][nio]SocketChannel should throw AsynchronousCloseException if the channel is closed in another thread
Date Thu, 15 Jul 2010 06:38:50 GMT

     [ 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message