You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tony Wu (JIRA)" <ji...@apache.org> on 2007/01/03 07:44:27 UTC

[jira] Created: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.

[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

        

[jira] Assigned: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison reassigned HARMONY-2938:
------------------------------------

    Assignee: Tim Ellison

> [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
>         Assigned To: Tim Ellison
>         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

        

[jira] Commented: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462935 ] 

Tony Wu commented on HARMONY-2938:
----------------------------------

Verified at r493917. Thanks Tim.

> [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
>         Assigned To: Tim Ellison
>         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

        

[jira] Commented: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462431 ] 

Tony Wu commented on HARMONY-2938:
----------------------------------

would you please try my patch? thanks a lot!

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

        

[jira] Updated: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
     [ 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

        

[jira] Updated: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.

Posted by "Tony Wu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

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

    Patch Info: [Patch Available]

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

        

[jira] Closed: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison closed HARMONY-2938.
--------------------------------


Verified by Tony.


> [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
>         Assigned To: Tim Ellison
>         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

        

[jira] Resolved: (HARMONY-2938) [classlib][luni]no NPE was thrown when send a DatagramPacket with no dest addresss.

Posted by "Tim Ellison (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tim Ellison resolved HARMONY-2938.
----------------------------------

    Resolution: Fixed

Thanks Tony.

A slightly modified version of your patch was applied to LUNI module at repo revision r492957.

Please check that it was applied as you expected.


> [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
>         Assigned To: Tim Ellison
>         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