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-913) [classlib][nio] o.a.h.nio.DatagramChannelImpl.send(ByteBuffer,SocketAddress) throws wrong exception
Date Wed, 19 Jul 2006 03:53:14 GMT
[classlib][nio] o.a.h.nio.DatagramChannelImpl.send(ByteBuffer,SocketAddress) throws wrong exception
---------------------------------------------------------------------------------------------------

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


Hello, 

DatagramChannelImpl.send(ByteBuffer,SocketAddress) should throw NullPointerException if the
given ByteBuffer is null and this channel is closed.

Following test reproduces the bug. The test passes against RI, while fails against Harmony.

public void test_datagram_send() throws IOException{
        DatagramChannel channel1=DatagramChannel.open();
        channel1.close();
        try {
            channel1.send(null, null);
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            //pass
        }
    }

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