Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 90782 invoked from network); 5 May 2009 07:03:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 May 2009 07:03:53 -0000 Received: (qmail 68784 invoked by uid 500); 5 May 2009 07:03:53 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 68749 invoked by uid 500); 5 May 2009 07:03:53 -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 68640 invoked by uid 99); 5 May 2009 07:03:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 May 2009 07:03:53 +0000 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, 05 May 2009 07:03:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5182C234C003 for ; Mon, 4 May 2009 23:58:30 -0700 (PDT) Message-ID: <1432426194.1241506710318.JavaMail.jira@brutus> Date: Mon, 4 May 2009 23:58:30 -0700 (PDT) From: "Regis Xu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (HARMONY-6144) [classlib][sql] java.sql.Timestamp.valueOf(String s) should throw java.lang.IllegalArgumentException if the given string isn't in yyyy-mm-dd hh:mm:ss.fffffffff format In-Reply-To: <1263377169.1239350592989.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Regis Xu resolved HARMONY-6144. ------------------------------- Resolution: Fixed Thanks Kevin. Patch applied at r771574, please verify it was applied as you expected. > [classlib][sql] java.sql.Timestamp.valueOf(String s) should throw java.lang.IllegalArgumentException if the given string isn't in yyyy-mm-dd hh:mm:ss.fffffffff format > ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-6144 > URL: https://issues.apache.org/jira/browse/HARMONY-6144 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M9 > Reporter: Kevin Zhou > Assignee: Regis Xu > Fix For: 5.0M10 > > Attachments: HARMONY-6144.diff, HARMONY-6144v2.diff > > Original Estimate: 24h > Remaining Estimate: 24h > > Given a test case [1], RI6 passes while both of HY and RI5 fails. > The java spec specifies that java.sql.Timestamp.valueOf(String s) should throw IllegalArgumentException if the given string does not have the format yyyy-mm-dd hh:mm:ss.fffffffff. > I think we should follow RI6's behavior according to the requirement of java spec here. > [1] Test Case: > public void test_valueOf_IllegalArgumentException() { > try { > java.sql.Timestamp.valueOf("178548938-12-22 15:00:01.000000001"); > fail("should throw IllegalArgumentException"); > } catch (IllegalArgumentException e) { > // Expected > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.