Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 70746 invoked from network); 19 Feb 2008 21:37:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Feb 2008 21:37:29 -0000 Received: (qmail 9347 invoked by uid 500); 19 Feb 2008 21:37:12 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 9323 invoked by uid 500); 19 Feb 2008 21:37:12 -0000 Mailing-List: contact commits-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 commits@harmony.apache.org Received: (qmail 9274 invoked by uid 99); 19 Feb 2008 21:37:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2008 13:37:11 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Feb 2008 21:36:46 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 16582234C050 for ; Tue, 19 Feb 2008 13:36:44 -0800 (PST) Message-ID: <349475718.1203457004090.JavaMail.jira@brutus> Date: Tue, 19 Feb 2008 13:36:44 -0800 (PST) From: "Alexei Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Closed: (HARMONY-5498) [classlib][text][icu][struts] DateFormatSymbols.getMonth() does not add empty string to the end of the list In-Reply-To: <3646015.1202828350639.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 [ https://issues.apache.org/jira/browse/HARMONY-5498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexei Zakharov closed HARMONY-5498. ------------------------------------ Closed as Non-bug difference from RI > [classlib][text][icu][struts] DateFormatSymbols.getMonth() does not add empty string to the end of the list > ----------------------------------------------------------------------------------------------------------- > > Key: HARMONY-5498 > URL: https://issues.apache.org/jira/browse/HARMONY-5498 > Project: Harmony > Issue Type: Bug > Components: App-Oriented Bug Reports, Classlib, Non-bug differences from RI > Environment: all > Reporter: Alexei Zakharov > Assignee: Alexei Zakharov > Attachments: H5498-scenarioFix.patch > > > This is a compatibility issue. Current ICU-based implementation of DateFormatSymbols#getMonths() does not add an empty string to the end of the list. This behavior is not required by the specification but RI does it. Our previous non-ICU implementation did it as well - see M4 snapshot. The same issue exists for #getWeekdays(), #getShortMonths() and #getShortWeekdays() methods. Please see the test case below. > DateFormatSymbolsTest.java > --- > import java.text.DateFormatSymbols; > public class DateFormatSymbolsTest { > public static void main(String argv[]) { > String[] months = new DateFormatSymbols().getMonths(); > for (String m : months) { > System.out.println("\"" + m + "\""); > } > } > } > --- > on RI (if English system locale is selected) the output is: > "January" > "February" > "March" > "April" > "May" > "June" > "July" > "August" > "September" > "October" > "November" > "December" > "" > on Harmony (since r612718): > "January" > "February" > "March" > "April" > "May" > "June" > "July" > "August" > "September" > "October" > "November" > "December" > The bad news here is that some application depends on such RI behaviour. Example - Struts showcase application that comes together with Struts distribution. It directly uses "new DateFormatSymbols().getMonths();" in one of its action. And if no empty string was supplied there is no empty choice in drop-down list on the web page. So user is obliged to choose some month and can't leave the field blank. However, this is not the intended behavior. > Our struts scenario fails since January 17 because of this issue. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.