On Tue, 18 Nov 2003, Richard Scranton wrote:
> In file
> postgresql-7.4/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java,
> the JDBC version 1 driver cannot be built with JDK v1.1.8 because that
> version of the Double class does not include a static parseDouble(String)
> method, which first appeared in JDK 1.2. The driver will compile if
> line 836 is
> modified as below.
>
> // XXX if (Double.parseDouble(s)==1)
> if (Double.valueOf(s).doubleValue()==1)
>
Here's a patch for the fix you describe. Not that a one liner needs one,
but less work for the committers as well as getting it to the JDBC list.
Kris Jurka
? src/interfaces/jdbc/blob_testoutput
? src/interfaces/jdbc/org/postgresql/test/jdbc2/ResultSetMetaDataTest.java
Index: src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
===================================================================
RCS file:
/projects/cvsroot/pgsql-server/src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java,v
retrieving revision 1.23
diff -c -r1.23 AbstractJdbc1ResultSet.java
*** src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java 3 Nov
2003 15:22:07 -0000 1.23
--- src/interfaces/jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java 19 Nov
2003 00:40:23 -0000
***************
*** 834,840 ****
try
{
! if (Double.parseDouble(s)==1)
return true;
}
catch (NumberFormatException e)
--- 834,840 ----
try
{
! if (Double.valueOf(s).doubleValue()==1)
return true;
}
catch (NumberFormatException e)
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend