Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 22272 invoked from network); 14 May 2009 16:04:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 May 2009 16:04:23 -0000 Received: (qmail 55645 invoked by uid 500); 14 May 2009 16:04:22 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 55596 invoked by uid 500); 14 May 2009 16:04:22 -0000 Mailing-List: contact dev-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 dev@harmony.apache.org Received: (qmail 55585 invoked by uid 99); 14 May 2009 16:04:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2009 16:04:22 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of oliver.deakin@googlemail.com designates 74.125.78.150 as permitted sender) Received: from [74.125.78.150] (HELO ey-out-1920.google.com) (74.125.78.150) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 May 2009 16:04:10 +0000 Received: by ey-out-1920.google.com with SMTP id 13so327880eye.24 for ; Thu, 14 May 2009 09:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=0lAqoehQRcUfwO/j2ClCL56PT3pZlkN5lyWNe1e3lwI=; b=rWCGBrcqe7lXlXn2FHlE6FIdRZeflIte9lxmFh6nCGkilIi+1BNwBoNUQzA/ydsdM+ LPzcffIADXOVdZEn2O/tm60cHxPYDIg3JoiadPgC8BNhwoUFN7zkFjE+oXvGngCERmJL u5LF70emGiBnjz0T0wpT4AT4CpnWgH6vIj1wI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=PL6RzIHUW+DndwFwIdP2q6EM/jdGLiuarlYvZIVBV5Sh7q8JFQecZPfyfkbNUZCP5K f4ijIbCI6P3YkLwYvfYfB/AhNFRpbGgM9K4QZTUSfAHEzmfEx8Z4IBFZcmFbGWduW5Kf zccjGu/wyCG6JgqIo9XrxqPUX/d451E4Z2e9k= Received: by 10.210.129.19 with SMTP id b19mr2985018ebd.0.1242317029505; Thu, 14 May 2009 09:03:49 -0700 (PDT) Received: from ?9.20.183.159? (blueice1n1.uk.ibm.com [195.212.29.67]) by mx.google.com with ESMTPS id 24sm209121eyx.43.2009.05.14.09.03.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 14 May 2009 09:03:47 -0700 (PDT) Message-ID: <4A0C40E3.6050708@googlemail.com> Date: Thu, 14 May 2009 17:03:47 +0100 From: Oliver Deakin User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: dev@harmony.apache.org Subject: Re: [jira] Created: (HARMONY-6207) [classlib][text] SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition would fail References: <1853555057.1242145425682.JavaMail.jira@brutus> In-Reply-To: <1853555057.1242145425682.JavaMail.jira@brutus> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hi Jim, I just had a look at this JIRA and had a question about it. It sounds from your description that we are seeing a difference between ICU's and Harmony's implementation of some Calendar related classes. This seems to me like a bug in either our code or ICU's and I wasn't sure that fixing the tests to pass was the right thing to do here. My thoughts were that we need to do one of: - raise a bug with ICU and fix the tests for now. - fix a bug in our GregorianCalendar class. - delegate from our GregorianCalendar class to ICU's version (why don't we do this already?). I may be missing something, so I thought I'd ask - it just seems that there is a bug/discrepancy here somewhere that needs to be fixed. I guess my question is: why is this a fix to the tests and not the code? :) Regards, Oliver Jim Yu (JIRA) wrote: > [classlib][text] SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition would fail > ---------------------------------------------------------------------------------------------------- > > Key: HARMONY-6207 > URL: https://issues.apache.org/jira/browse/HARMONY-6207 > Project: Harmony > Issue Type: Test > Components: Classlib > Affects Versions: 5.0M9 > Reporter: Jim Yu > Fix For: 5.0M10 > > > Currently, the testcase SimpleDateFormatTest.test_parseLjava_lang_StringLjava_text_ParsePosition would fail. I've investigated the root cause of this failure and found the main reason is that the GregorianCalendar class used in the testcase is implemented by Harmony itself not delegating to ICU. So when we call getTime of GregorianCalendar to get an Date instance as the expected value, it would not equal to the one created by ICU as the result. E.g. the following testcase [1] would fail while [2] can pass. So I use Date instances directly for these failing ones in my patch. > [1] test.parse("yyy", "99", new GregorianCalendar(99, Calendar.JANUARY, 1) > .getTime(), 0, 2); > [2] test.parse("yyy", "99", new com.ibm.icu.util.GregorianCalendar(99, Calendar.JANUARY, 1) > .getTime(), 0, 2); > > > -- Oliver Deakin Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU