pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mike Fowler <mike@mlfowler.com>
To: Lew <noone@lewscanon.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Failing test in org.postgresql.test.jdbc2.DateTest
Date: Mon, 28 Feb 2011 13:43:34 +0000
Message-ID: <4D6BA686.1050806@mlfowler.com> (raw)
In-Reply-To: <ikg611$he7$1@news.albasani.net>
References: <4D6538EA.8080905@mlfowler.com>
	<ikg611$he7$1@news.albasani.net>

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




view thread (6+ messages)  latest in thread

Message-ID: <4D6BA686.1050806@mlfowler.com>
Permalink:  ../4D6BA686.1050806@mlfowler.com/
Also on:    postgresql.org/message-id/4D6BA686.1050806@mlfowler.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mike@mlfowler.com, noone@lewscanon.com
  Subject: Re: Failing test in org.postgresql.test.jdbc2.DateTest
  In-Reply-To: <4D6BA686.1050806@mlfowler.com>
  References: <4D6538EA.8080905@mlfowler.com> <ikg611$he7$1@news.albasani.net> <4D6BA686.1050806@mlfowler.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox