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] Created: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.
Date Wed, 03 Jan 2007 06:44:27 GMT
[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


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