Re: Failing test in org.postgresql.test.jdbc2.DateTest - Mailing list pgsql-jdbc

From Mike Fowler
Subject Re: Failing test in org.postgresql.test.jdbc2.DateTest
Date
Msg-id 4D6BA686.1050806@mlfowler.com
Whole thread Raw
In response to Re: Failing test in org.postgresql.test.jdbc2.DateTest  (Lew <noone@lewscanon.com>)
List pgsql-jdbc
On 28/02/11 12:56, Lew wrote:
> On 02/23/2011 11:42 AM, Mike Fowler wrote:
>>
>> * @param s a <code>String</code> 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


pgsql-jdbc by date:

Previous
From: Lew
Date:
Subject: Re: Failing test in org.postgresql.test.jdbc2.DateTest
Next
From: Valentine Gogichashvili
Date:
Subject: Type OID search does not support search_path and multiple schemas