Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 72514 invoked from network); 18 Nov 2007 23:27:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Nov 2007 23:27:04 -0000 Received: (qmail 72488 invoked by uid 500); 18 Nov 2007 23:26:51 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 72477 invoked by uid 99); 18 Nov 2007 23:26:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Nov 2007 15:26:51 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Nov 2007 23:26:49 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2F61671420B for ; Sun, 18 Nov 2007 15:26:43 -0800 (PST) Message-ID: <11713035.1195428403191.JavaMail.jira@brutus> Date: Sun, 18 Nov 2007 15:26:43 -0800 (PST) From: "Craig Russell (JIRA)" To: jdo-dev@db.apache.org Subject: [jira] Commented: (JDO-547) api2 ObjectIdentityTest.testStringNullDateConstructor fails due to unexpected date format in different locales In-Reply-To: <16381326.1193324631473.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/JDO-547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12543430 ] Craig Russell commented on JDO-547: ----------------------------------- Looks good. > api2 ObjectIdentityTest.testStringNullDateConstructor fails due to unexpected date format in different locales > -------------------------------------------------------------------------------------------------------------- > > Key: JDO-547 > URL: https://issues.apache.org/jira/browse/JDO-547 > Project: JDO > Issue Type: Bug > Components: api2, api2-legacy > Affects Versions: JDO 2 maintenance release 1 > Reporter: Michael Bouschen > Assignee: Michael Bouschen > Fix For: JDO 2 maintenance release 1 > > Attachments: JDO-547.patch > > > Method testStringNullDateConstructor of api2 test class ObjectIdentityTest uses a DateFormat instance obtained by DateFormat.getInstance(). This returns the default date/time formatter which is then used to parse a date in format "M/d/yy h:mm a". > This does not work in case the default date/time formatter uses a format different from "M/d/yy h:mm a", because of a different locale. E.g. the format for the German locale is "dd.MM.yy HH:mm". This leads to an exception when parsing the date string: > Testcase: testStringNullDateConstructor(javax.jdo.identity.ObjectIdentityTest): Caused an ERROR > Error parsing Date string "10/9/2007 4:26 PM" at position 2 using date format "dd.MM.yy HH:mm". > javax.jdo.JDOUserException: Error parsing Date string "10/9/2007 4:26 PM" at position 2 using date format "dd.MM.yy HH:mm". -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.