Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 37757 invoked from network); 14 Sep 2006 09:33:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Sep 2006 09:33:04 -0000 Received: (qmail 29173 invoked by uid 500); 14 Sep 2006 09:32:57 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 29117 invoked by uid 500); 14 Sep 2006 09:32:57 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 29058 invoked by uid 99); 14 Sep 2006 09:32:57 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Sep 2006 02:32:57 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=mloenko@gmail.com; spf=pass Authentication-Results: idunn.apache.osuosl.org header.from=mloenko@gmail.com; domainkeys=good X-ASF-Spam-Status: No, hits=0.4 required=5.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP Received-SPF: pass (idunn.apache.osuosl.org: domain gmail.com designates 64.233.166.183 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from ([64.233.166.183:16003] helo=py-out-1112.google.com) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id F3/61-03980-77129054 for ; Thu, 14 Sep 2006 02:32:50 -0700 Received: by py-out-1112.google.com with SMTP id c30so3446389pyc for ; Thu, 14 Sep 2006 02:31:33 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=i+l4Xp8FhdPEpvSFzRCxtRPjcft3i8Gt59Wkx8r2YadeVtEyUPaG9qS1rlKxmrQXDQGpdzIk0/ZEEcjF7zDs73EjE6TH2ryO5Pzg856y9AdlWINPtwoN+B25yNc8C/m9qKe0h1Z1GIOIMBBdjYhproxES6/qEPX568UvKmZyBMs= Received: by 10.65.237.19 with SMTP id o19mr9881887qbr; Thu, 14 Sep 2006 02:31:30 -0700 (PDT) Received: by 10.65.93.12 with HTTP; Thu, 14 Sep 2006 02:31:30 -0700 (PDT) Message-ID: <906dd82e0609140231p1eeb6dddp3ade9f46970e86a0@mail.gmail.com> Date: Thu, 14 Sep 2006 16:31:30 +0700 From: "Mikhail Loenko" To: harmony-dev@incubator.apache.org Subject: Re: [classlib][luni] java.net.URL(String, String, int, String) constructor exception thrown sequence (was re: [jira] Commented: (HARMONY-1158) [classlib][luni]Compatibility: java.net.URL new URL("ss", null, -3, null) throws MalformedURLException whil In-Reply-To: <4d0b24970609131902q7f950778sf3a69a4f291bdf4b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4d0b24970609131902q7f950778sf3a69a4f291bdf4b@mail.gmail.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N It's not clear why it should be non-bug diff? Shouldn't it be fixed to follow RI? Thanks, Mikhail 2006/9/14, Andrew Zhang : > Would any commiter like to confirm and close this "non-bug differences from > RI" jira? Thanks! > > On 9/13/06, Andrew Zhang wrote: > > > > From: Andrew Zhang (JIRA) > > Date: Sep 13, 2006 11:02 AM > > Subject: [jira] Commented: (HARMONY-1158) [classlib][luni]Compatibility: > > java.net.URL new URL("ss", null, -3, null) throws MalformedURLException > > while RI throws NPE > > To: harmony-commits@incubator.apache.org > > > > [ > > http://issues.apache.org/jira/browse/HARMONY-1158?page=comments#action_12434348] > > > > Andrew Zhang commented on HARMONY-1158: > > --------------------------------------- > > > > Ilya, I agree with you. Spec has explicitly pointed out "No validation of > > the inputs is performed by this constructor." > > > > The tests show that the exception thrown sequence is uncertain and > > implemention-dependent. > > > > If no application and test cases are broken by currenty Harmony code, I > > suggest not fix the problem. > > > > Best regards, > > Andrew > > > > > [classlib][luni]Compatibility: java.net.URL new URL("ss", null, -3, > > null) throws MalformedURLException while RI throws NPE > > > > > -------------------------------------------------------------------------------------------------------------------------- > > > > > > Key: HARMONY-1158 > > > URL: http://issues.apache.org/jira/browse/HARMONY-1158 > > > Project: Harmony > > > Issue Type: Bug > > > Components: Non-bug differences from RI > > > Reporter: Ilya Okomin > > > > > > Compatibility. Different order of exceptions. > > > RI throws unspecified NPE in java.net.URL("ss", null, -3, null) > > constructor if host ==null while Harmony at first checks port and throws > > MalformedURLException. > > > If host != null both RI and Harmony throw MalformedURLException. > > > =============test.java============= > > > import java.net.*; > > > public class test { > > > public static void main (String[] args) { > > > try { > > > new URL("ss", "0", -3, null); > > > } catch (Exception e) { > > > e.printStackTrace(); > > > } > > > try { > > > new URL("ss", null, -3, null); > > > } catch (Exception e) { > > > e.printStackTrace(); > > > } > > > } > > > } > > > ======================================= > > > Output on RI: > > > java.net.MalformedURLException : Invalid port number :-3 > > > at java.net.URL.(URL.java:373) > > > at java.net.URL.(URL.java:283) > > > at test.main(test.java:7) > > > java.lang.NullPointerException > > > at java.net.Parts.(URL.java:1259) > > > at java.net.URL.(URL.java:380) > > > at java.net.URL.(URL.java:283) > > > at test.main(test.java:13) > > > Output on Harmony: > > > java.net.MalformedURLException: Port out of range: -3 > > > at java.net.URL.(URL.java:393) > > > at java.net.URL.(URL.java:367) > > > at test.main(test.java:7) > > > java.net.MalformedURLException: Port out of range: -3 > > > at java.net.URL.(URL.java:393) > > > at java.net.URL.(URL.java:367) > > > > -- > > This message is automatically generated by JIRA. > > - > > If you think it was sent incorrectly contact one of the administrators: > > http://issues.apache.org/jira/secure/Administrators.jspa > > - > > For more information on JIRA, see: http://www.atlassian.com/software/jira > > > > > > > > > > > > -- > > Andrew Zhang > > China Software Development Lab, IBM > > > > > > -- > Andrew Zhang > China Software Development Lab, IBM > > --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org