Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 62714 invoked from network); 21 Jul 2006 14:27:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Jul 2006 14:27:29 -0000 Received: (qmail 33970 invoked by uid 500); 21 Jul 2006 14:27:29 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 33944 invoked by uid 500); 21 Jul 2006 14:27:29 -0000 Mailing-List: contact harmony-commits-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-commits@incubator.apache.org Received: (qmail 33933 invoked by uid 99); 21 Jul 2006 14:27:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 07:27:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Jul 2006 07:27:28 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A36CD410011 for ; Fri, 21 Jul 2006 14:25:15 +0000 (GMT) Message-ID: <20116921.1153491915666.JavaMail.jira@brutus> Date: Fri, 21 Jul 2006 07:25:15 -0700 (PDT) From: "Anton Luht (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-901) java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null In-Reply-To: <20842880.1153155795294.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-901?page=comments#action_12422651 ] Anton Luht commented on HARMONY-901: ------------------------------------ verified on DRLVM + classlib revision 424264 msvc debug > java.util.Locale(String language, String country, String variant) constructor doesn't throw NPE when variant is null > -------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-901 > URL: http://issues.apache.org/jira/browse/HARMONY-901 > Project: Harmony > Issue Type: Bug > Components: Classlib > Environment: Windows XP Professional > Reporter: Anton Luht > Assigned To: Nathan Beyer > Priority: Minor > Attachments: patch.txt > > > VM + classlib revision 422694 msvc debug build > Problem: > java.util.Locale(String, String, String) does not throw NullPointerException when one of arguments is null. > RI throws it. > Java spec 1.5.0 says: > "Throws: > NullPointerException - thrown if any argument is null. > ". > import java.util.Locale; > public class Test { > public static void main(String args[]) { > try { > new Locale("aaa", "ccc", null); > System.out.println("No Exception!"); > } catch (NullPointerException e) { > System.out.println("Exception thrown "+e); > e.printStackTrace(); > } > } > } > Output in RI: > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > Exception thrown java.lang.NullPointerException > java.lang.NullPointerException > at java.util.Locale.(Locale.java:247) > at Test.main(test.java:6) > Output in Harmony: > No Exception! > --------- > The patch with JUnit test and classlib code modification that resolves this problem is attached -- 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