Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 98777 invoked from network); 13 Jan 2006 17:11:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jan 2006 17:11:53 -0000 Received: (qmail 79134 invoked by uid 500); 13 Jan 2006 17:11:45 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 79064 invoked by uid 500); 13 Jan 2006 17:11:44 -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 79048 invoked by uid 99); 13 Jan 2006 17:11:43 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2006 09:11:42 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 6A8CB185 for ; Fri, 13 Jan 2006 18:11:21 +0100 (CET) Message-ID: <969780423.1137172281434.JavaMail.jira@ajax.apache.org> Date: Fri, 13 Jan 2006 18:11:21 +0100 (CET) From: "Tim Ellison (JIRA)" To: harmony-dev@incubator.apache.org Subject: [jira] Assigned: (HARMONY-28) java.text.RuleBasedCollator. getCollationKey (null) does not return null In-Reply-To: <401234954.1137158300192.JavaMail.jira@ajax.apache.org> 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-28?page=all ] Tim Ellison reassigned HARMONY-28: ---------------------------------- Assign To: Tim Ellison (was: Geir Magnusson Jr) > java.text.RuleBasedCollator. getCollationKey (null) does not return null > ------------------------------------------------------------------------ > > Key: HARMONY-28 > URL: http://issues.apache.org/jira/browse/HARMONY-28 > Project: Harmony > Type: Bug > Components: Classlib > Reporter: tatyana doubtsova > Assignee: Tim Ellison > > Problem details: > j2se1.4.2 specifies that CollationKey java.text. RuleBasedCollator.getCollationKey(String source) returns a null CollationKey, if the source String is null. > Code for reproducing Test.java: > import java.text.*; > public class Test { > public static void main(String[] args) { > String source = null; > RuleBasedCollator rbc = null; > String Simple = "< a< b< c< d"; > try { > rbc = new RuleBasedCollator(Simple); > } catch (ParseException e) { > } > CollationKey ck = rbc.getCollationKey(source); > System.out.println(ck == null ? "PASSED" : "FAILED"); > System.out > .println(ck instanceof CollationKey ? "the instance of CollationKey" > : "not the instance of CollationKey"); > } > } > Steps to Reproduce: > 1. Build Harmony-14 j2se subset as described in README.txt. > 2. Compile Test.java using BEA 1.4 javac > > javac -d . Test.java > 2. Run java using compatible VM (J9) > > java -showversion Test > Output: > java version 1.4.2 (subset) > (c) Copyright 1991, 2005 The Apache Software Foundation or its licensors, as applicable. > FAILED > the instance of CollationKey > Output on BEA 1.4.2 to compare with: > PASSED > not the instance of CollationKey > The suggested junit test case: > package org.apache.harmony.tests.java.text; > import java.text.*; > > import junit.framework.TestCase; > public class RuleBasedCollatorTest extends TestCase { > public static void main(String[] args) { > junit.textui.TestRunner.run(RuleBasedCollatorTest.class); > } > public void test_getCollationKey() { > String source = null; > RuleBasedCollator rbc = null; > try { > String Simple = "< a< b< c< d"; > rbc = new RuleBasedCollator(Simple); > } catch (ParseException e) { > fail("Assert 0: Unexpected format exception " + e); > } > CollationKey ck = rbc.getCollationKey(source); > assertTrue("Assert 1: getCollationKey (null) does not return null", ck == null ); } > } -- 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