harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Zhang (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-748) [classlib][nio] java.nio.channels.ServerSocketChannel.accept() should throw IllegalBlockingModeException if the channel is in non-blocking mode and there is no pending connetions.
Date Tue, 04 Jul 2006 13:02:29 GMT
[classlib][nio] java.nio.channels.ServerSocketChannel.accept() should throw IllegalBlockingModeException
if the channel is in non-blocking mode and there is no pending connetions.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

         Key: HARMONY-748
         URL: http://issues.apache.org/jira/browse/HARMONY-748
     Project: Harmony
        Type: Bug

    Reporter: Andrew Zhang


java.nio.channels.ServerSocketChannel.accept() should throw IllegalBlockingModeException if
the channel is in non-blocking mode and there is no pending connetions. Following test  reproduces
the bug:

public void testAccept_NonBlocking_NoConnect() throws IOException {
        ServerSocketChannel sc = ServerSocketChannel.open();
        sc.configureBlocking(false);
        try {
            sc.socket().accept();
            fail("Should throw IllegalBlockingModeException");
        } catch (IllegalBlockingModeException e) {
            // expected
        }
    }

RI 5.0 passes the test while Harmony fails. 

I'll upload a patch to fix the problem soon.

Thanks!

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