[ 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.(DatagramPacket.java:123) at java.net.DatagramPacket.(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.