harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.
Date Fri, 05 Jan 2007 07:59:27 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tony Wu updated HARMONY-2938:
-----------------------------

    Attachment: harmony-2938.diff

> [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.
> -----------------------------------------------------------------------------------
>
>                 Key: HARMONY-2938
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2938
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Tony Wu
>         Attachments: harmony-2938.diff
>
>
> RI throws NPE when send DatagramPacket with no destination address, where harmony return
silently.
> testcase below passes on RI whereas fails on harmony,
> public void test_send() throws IOException {
>         InetAddress i = InetAddress.getByName("127.0.0.1");
>         DatagramSocket d = new DatagramSocket(80,i);
>         try{
>             d.send(new DatagramPacket(new byte[]{1}, 1));
>             fail("should throw NPE.");
>         }catch(NullPointerException e){
>             //expected;
>         }finally{
>             d.close();
>         }
>     }

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

        

Mime
View raw message