From commits-return-61357-apmail-harmony-commits-archive=harmony.apache.org@harmony.apache.org Mon Feb 08 05:19:50 2010 Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 88460 invoked from network); 8 Feb 2010 05:19:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Feb 2010 05:19:50 -0000 Received: (qmail 48454 invoked by uid 500); 8 Feb 2010 05:19:50 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 48357 invoked by uid 500); 8 Feb 2010 05:19:49 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 48348 invoked by uid 99); 8 Feb 2010 05:19:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 05:19:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Feb 2010 05:19:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EAA4D234C052 for ; Sun, 7 Feb 2010 21:19:27 -0800 (PST) Message-ID: <1833476175.114631265606367959.JavaMail.jira@brutus.apache.org> Date: Mon, 8 Feb 2010 05:19:27 +0000 (UTC) From: "Regis Xu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6412) [classlib][luni]DatagramSock do NOT throw Exception In-Reply-To: <482940408.1261548092797.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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.