Re: AGAIN: still no answer ... peter, or anybody knowledgeable, please .... - Mailing list pgsql-jdbc

From Michael Stephenson
Subject Re: AGAIN: still no answer ... peter, or anybody knowledgeable, please ....
Date
Msg-id Pine.LNX.4.30.0105081616310.18214-100000@tirin.openworld.co.uk
Whole thread Raw
In response to Re: AGAIN: still no answer ... peter, or anybody knowledgeable, please ....  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Re: AGAIN: still no answer ... peter, or anybody knowledgeable, please ....  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-jdbc
> The current CVS sources look wrong to me.  It has:
>
>   if (result != null) && ((org.postgresql.ResultSet)result.reallyResultSet())
>
> Shouldn't this be:
>
>   if (result != null && ((org.postgresql.ResultSet)result.reallyResultSet()))
>
> Not sure if the extra parens are needed for:
>
>   if (result != null && ((org.postgresql.ResultSet)result).reallyResultSet())
>
> Comments?

The extra parenthesis are required (since java.sql.ResultSet doesn't
have a method 'reallyResultSet()' which returns an object which can be
succesfully cast as a 'org.postgresql.ResultSet), but I think it would be
cleaner just to declare 'result' as 'org.postgresql.ResultSet' on line 27,
that way none of the messy casts (of which there are 11) would be
required..

Michael xxx


pgsql-jdbc by date:

Previous
From: Juhan-Peep Ernits
Date:
Subject: Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()
Next
From: Bruce Momjian
Date:
Subject: Re: Re: [INTERFACES] Trouble with JDBC2 ResultSet.getDate()