harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Harley (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-889) [classlib][nio] SocketChannel.socket().getInputStream/getOutputStream should delegate all of its operations to the associated channel.
Date Mon, 17 Jul 2006 10:17:15 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-889?page=all ]

George Harley reassigned HARMONY-889:
-------------------------------------

    Assignee: George Harley

> [classlib][nio] SocketChannel.socket().getInputStream/getOutputStream should delegate
all of its operations to the associated channel.
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-889
>                 URL: http://issues.apache.org/jira/browse/HARMONY-889
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Andrew Zhang
>         Assigned To: George Harley
>         Attachments: nio.diff
>
>
> SocketChannel.socket().getInputStream/getOutputStream should delegate all of its operations
to the associated channel. 
> Currently, Harmony's implementation doesn't delegate the operations to channel, but to
super.getInputStream/getOutputStream.
> Following test reproduces a bug caused by current implementation:
>     public void test_getOutputStream() throws Exception {
>         ServerSocket ss = new ServerSocket(0);
>         SocketChannel sc = SocketChannel.open();
>         sc.connect(new InetSocketAddress("127.0.0.1", ss.getLocalPort()));
>         OutputStream os = sc.socket().getOutputStream();
>         os.close();
>         try {
>             os.write(1);
>             fail("should throw ClosedChannelException");
>         } catch (ClosedChannelException e) {
>             // expected
>         } 
>     }
> The test passes against RI while fails against Harmony.
> I'll upload a patch to fix this problem and supplement more tests. 
> Thanks.
> Best regards,
> Andrew

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message