You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Ray Chen (JIRA)" <ji...@apache.org> on 2009/12/23 07:01:32 UTC

[jira] Created: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

[classlib][luni]DatagramSock do NOT throw Exception
---------------------------------------------------

                 Key: HARMONY-6412
                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
             Project: Harmony
          Issue Type: Sub-task
          Components: Classlib
            Reporter: Ray Chen


Run following simple test case, got different results from RI:

public static void main(String[] args) throws SocketException, IOException {
       InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
       new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
}


RI 5:
Exception in thread "main" java.lang.NullPointerException: null address || null buffer
       at java.net.PlainDatagramSocketImpl.send(Native Method)
       at java.net.DatagramSocket.send(DatagramSocket.java:612)
       at DST2.main(DST2.java:10)
Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

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

Regis Xu resolved HARMONY-6412.
-------------------------------

    Resolution: Duplicate

Duplicate of HARMONY-6413.

> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>             Fix For: 5.0M13
>
>         Attachments: Harmony-6412-v2.diff, Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

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

Ray Chen updated HARMONY-6412:
------------------------------

    Attachment: Harmony-6412.diff

> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830842#action_12830842 ] 

Regis Xu commented on HARMONY-6412:
-----------------------------------

The behavior is out of spec's scope, so we are free here I think :)
The best behavior I think is friendly to help users to understand what's wrong in their code, so I prefer java6 way to java5.

> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>             Fix For: 5.0M13
>
>         Attachments: Harmony-6412-v2.diff, Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830844#action_12830844 ] 

Ray Chen commented on HARMONY-6412:
-----------------------------------

OK, I agree.
So, can you help to review and commit it if there is no problem.

Thank you!




-- 
Regards,

Ray Chen


> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>             Fix For: 5.0M13
>
>         Attachments: Harmony-6412-v2.diff, Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

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

Ray Chen updated HARMONY-6412:
------------------------------

    Attachment: Harmony-6412-v2.diff

Add one test int the new patch

> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony-6412-v2.diff, Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

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

Ray Chen updated HARMONY-6412:
------------------------------

    Fix Version/s: 5.0M13

> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>             Fix For: 5.0M13
>
>         Attachments: Harmony-6412-v2.diff, Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

Posted by "Ray Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830837#action_12830837 ] 

Ray Chen commented on HARMONY-6412:
-----------------------------------

RI5 and RI6 is different, so I created two sub-tasks for this
issue(6412 & 6413).

When RI5 and RI6's behavior is different, what rules should we follow?




-- 
Regards,

Ray Chen


> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>             Fix For: 5.0M13
>
>         Attachments: Harmony-6412-v2.diff, Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

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

Ray Chen updated HARMONY-6412:
------------------------------

    Patch Info: [Patch Available]

> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>         Attachments: Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

Posted by "Regis Xu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-6412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830834#action_12830834 ] 

Regis Xu commented on HARMONY-6412:
-----------------------------------

I ran the test with RI6 got:

Exception in thread "main" java.lang.IllegalArgumentException: unresolved address
	at java.net.DatagramPacket.setSocketAddress(DatagramPacket.java:295)
	at java.net.DatagramPacket.<init>(DatagramPacket.java:123)
	at java.net.DatagramPacket.<init>(DatagramPacket.java:158)

RI changed behavior between java5 and java6, and  IllegalArgumentException is more clear and reasonable for me, so I think we can just follow java6. What do you think?

> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>             Fix For: 5.0M13
>
>         Attachments: Harmony-6412-v2.diff, Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception

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

Ray Chen closed HARMONY-6412.
-----------------------------


see 6413

> [classlib][luni]DatagramSock do NOT throw Exception
> ---------------------------------------------------
>
>                 Key: HARMONY-6412
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6412
>             Project: Harmony
>          Issue Type: Sub-task
>          Components: Classlib
>            Reporter: Ray Chen
>             Fix For: 5.0M13
>
>         Attachments: Harmony-6412-v2.diff, Harmony-6412.diff
>
>
> Run following simple test case, got different results from RI:
> public static void main(String[] args) throws SocketException, IOException {
>        InetSocketAddress sa = InetSocketAddress.createUnresolved("localhost",0);
>        new DatagramSocket().send(new DatagramPacket(new byte[272], 3, sa));
> }
> RI 5:
> Exception in thread "main" java.lang.NullPointerException: null address || null buffer
>        at java.net.PlainDatagramSocketImpl.send(Native Method)
>        at java.net.DatagramSocket.send(DatagramSocket.java:612)
>        at DST2.main(DST2.java:10)
> Harmony :   No Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.