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-873) [classlib][luni] java.net.Socket.getOutputStream should throw SocketException if output has been shutdown by invoking shutdownOutputStream().
Date Fri, 14 Jul 2006 10:12:13 GMT
[classlib][luni] java.net.Socket.getOutputStream should throw SocketException if output has
been shutdown by invoking shutdownOutputStream(). 
----------------------------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-873
                 URL: http://issues.apache.org/jira/browse/HARMONY-873
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Andrew Zhang


java.net.Socket.getOutputStream should throw SocketException if output has been shutdown by
invoking shutdownOutputStream(). 

Following test reproduces the bug:

    public void test_getOutputStream() throws Exception {
        ServerSocket ss = new ServerSocket(2223);
        Socket s = new Socket("127.0.0.1", 2223);
        ss.accept();
        s.shutdownOutput();
        try {
            s.getOutputStream();
            fail("should throw SocketException");
        } catch (SocketException e) {
            // expected
        }
    }

The test passes against RI and fails against Harmony.

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

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