Re: getXXX methods

From: Kris Jurka <books(at)ejurka(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: getXXX methods
Date: 2004-07-06 21:01:15
Message-ID: Pine.BSO.4.56.0407061559110.373@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Tue, 6 Jul 2004, Dave Cramer wrote:

> Once possibility is to use Double.parseDouble(s).byteValue()
>
> so the code would become
>
> try
> {
> Byte.parseByte(s)
> }

Why bother with Byte.parseByte at all if you are going to fall back to the
double parsing anyway? As I mentioned earlier I think it is better to
throw an Exception rather than to silently alter the returned data.

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2004-07-06 22:56:54 Re: getXXX methods
Previous Message Dave Cramer 2004-07-06 20:23:07 Re: getXXX methods