Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id B6B761337B39 for ; Mon, 28 Feb 2011 09:43:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 72921-08 for ; Mon, 28 Feb 2011 13:43:39 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from milan.hostgo.com (milan.hostgo.com [72.52.99.130]) by mail.postgresql.org (Postfix) with ESMTP id 036B3133616B for ; Mon, 28 Feb 2011 09:43:37 -0400 (AST) Received: from [217.10.134.34] (helo=[192.168.1.71]) by milan.hostgo.com with esmtpa (Exim 4.69) (envelope-from ) id 1Pu3Nu-0000m2-FC; Mon, 28 Feb 2011 08:43:34 -0500 Message-ID: <4D6BA686.1050806@mlfowler.com> Date: Mon, 28 Feb 2011 13:43:34 +0000 From: Mike Fowler User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Lightning/1.0b2 Thunderbird/3.1.7 MIME-Version: 1.0 To: Lew CC: pgsql-jdbc@postgresql.org Subject: Re: Failing test in org.postgresql.test.jdbc2.DateTest References: <4D6538EA.8080905@mlfowler.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - milan.hostgo.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - mlfowler.com X-Source: X-Source-Args: X-Source-Dir: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201102/157 X-Sequence-Number: 21555 On 28/02/11 12:56, Lew wrote: > On 02/23/2011 11:42 AM, Mike Fowler wrote: >> >> * @param s a String object representing a date in >> * in the format "yyyy-mm-dd" > > The Java 7 docs say: > "s - a String object representing a date in in the format > "yyyy-[m]m-[d]d". The leading zero for mm and dd may also be omitted." > http://download.oracle.com/javase/7/docs/api/java/sql/Date.html > > So the java.sql.Date does accept single-digit month and day, at least > for Java 7. > > All the work you did to reject single-digit month and day are not > correct, if that's what you did. > It's not correct for Java 7 - but that isn't even out yet. I don't think it's wise to have tests that break in 1.6 just because the API will change in the not so distant future. Personally I think we should test handling of the 1.7 API separately once it's available. Regards, -- Mike Fowler Registered Linux user: 379787