You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Paulex Yang (JIRA)" <ji...@apache.org> on 2006/07/19 11:32:15 UTC

[jira] Resolved: (HARMONY-913) [classlib][nio] o.a.h.nio.DatagramChannelImpl.send(ByteBuffer,SocketAddress) throws wrong exception

     [ http://issues.apache.org/jira/browse/HARMONY-913?page=all ]

Paulex Yang resolved HARMONY-913.
---------------------------------

    Resolution: Fixed

Patch applied at revision r423413, thanks a lot for this enhancement, please verify that the problem is fully fixed as you expected.

> [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
>         Assigned To: Paulex Yang
>         Attachments: nio.diff
>
>
> 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