Re: Patch for JDBC timestamp problems - Mailing list pgsql-interfaces

From Michael Stephenson
Subject Re: Patch for JDBC timestamp problems
Date
Msg-id Pine.LNX.4.30.0101160928380.3131-100000@tirin.openworld.co.uk
Whole thread Raw
In response to Re: Patch for JDBC timestamp problems  (Joseph Shraibman <jks@selectacast.net>)
List pgsql-interfaces
> Using static SimpleDateFormats will probably not cause threading
> issues.  Common sense says that if the set methods are never called on
> them there will be no state change that my cause sync problems.  But the
> spec doesn't garuntee it.  Personally I would have no problem using
> static SimpleDateFormats if this were my code.

Unfortunately common sense is of no use in this case, at least as far as
ths Sun JDK 1.2.2 goes..

For parse() and format() it uses a Calendar object (originally defined in
DateFormat) for working on. Look at the code, it's truly frightening that
somebody would choose to write it this way.

Until yesterday I would have used static SimpleDateFormat objects in my
code too.. :o(

Michael Stephenson      mstephenson@openworld.co.uk
Developer   -    Web Applications    -   Open World
Tel: +44 1225 444 950         Fax: +44 1225 336 738



pgsql-interfaces by date:

Previous
From: Peter T Mount
Date:
Subject: Re: Deleting a list of external xinv/xinx files using JDBC
Next
From: "Adam Lang"
Date:
Subject: Re: ODBC with VISUAL BASIC applications to access POSTGRESQL db on LINUX??