Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 15678 invoked from network); 8 Mar 2006 03:20:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Mar 2006 03:20:03 -0000 Received: (qmail 16008 invoked by uid 500); 8 Mar 2006 03:20:03 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 15957 invoked by uid 500); 8 Mar 2006 03:20:02 -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 15946 invoked by uid 99); 8 Mar 2006 03:20:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Mar 2006 19:20:02 -0800 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) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Mar 2006 19:20:02 -0800 Received: from ajax (localhost.localdomain [127.0.0.1]) by ajax (Postfix) with ESMTP id 626CD6ACA9 for ; Wed, 8 Mar 2006 03:19:41 +0000 (GMT) Message-ID: <1397912354.1141787981400.JavaMail.jira@ajax> Date: Wed, 8 Mar 2006 03:19:41 +0000 (GMT) From: "Paulex Yang (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-178) java.text.DateFormat$Field's contructor may replace predefined consts with new value in cache 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-178?page=comments#action_12369372 ] Paulex Yang commented on HARMONY-178: ------------------------------------- it is fine, thank you, Tim > java.text.DateFormat$Field's contructor may replace predefined consts with new value in cache > --------------------------------------------------------------------------------------------- > > Key: HARMONY-178 > URL: http://issues.apache.org/jira/browse/HARMONY-178 > Project: Harmony > Type: Bug > Reporter: Paulex Yang > Assignee: Tim Ellison > Attachments: java.text.DateFormat.patch, java.text.DateFormatFieldTest.patch > > DataFormat$Field will cache some constants to be searched by method ofCalendarField(int), but the predefined consts should not be replaced. > the testcases is as below: > import java.text.DateFormat; > import java.util.Calendar; > import junit.framework.TestCase; > public class DataFormatFieldTest extends TestCase{ > public void test_Constructor2() { > MyField field = new MyField("day of month", Calendar.ERA); > DateFormat.Field realField = DateFormat.Field > .ofCalendarField(Calendar.ERA); > assertSame("Modified calendar field with the same field number", > DateFormat.Field.ERA, realField); > } > static class MyField extends DateFormat.Field { > protected MyField(String fieldName, int calendarField) { > super(fieldName, calendarField); > } > protected String getName() { > return super.getName(); > } > } > } > Run on RI 5.0, test case passes. > Run on Harmony, test case fail with message: > junit.framework.AssertionFailedError: Modified calendar field with the same field number expected same: was not: > ............ -- 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