X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A9CDED1B269 for ; Thu, 17 Jun 2004 11:54:57 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 87434-02 for ; Thu, 17 Jun 2004 14:54:57 +0000 (GMT) Received: from mail.devisser-siderius.com (unknown [207.164.133.174]) by svr1.postgresql.org (Postfix) with ESMTP id B01B5D1B1D2 for ; Thu, 17 Jun 2004 11:54:51 -0300 (ADT) Received: from [192.168.202.20] (CPE0004e24a1c3f-CM014210009127.cpe.net.cable.rogers.com [65.50.85.125]) by mail.devisser-siderius.com (8.11.6/8.9.3) with ESMTP id i5HEsuw15608 for ; Thu, 17 Jun 2004 10:54:56 -0400 From: Jan de Visser Organization: Digital Fairway To: pgsql-jdbc@postgresql.org Subject: ResultSet.updateCharacterStream Date: Thu, 17 Jun 2004 10:53:02 -0400 User-Agent: KMail/1.6.82 MIME-Version: 1.0 Message-Id: <200406171053.02305.jdevisser@digitalfairway.com> Content-Type: Multipart/Mixed; boundary="Boundary-00=_OBb0AqGHJZsIJAh" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.1 tagged_above=0.0 required=5.0 tests=RCVD_IN_SORBS X-Spam-Level: X-Archive-Number: 200406/71 X-Sequence-Number: 10273 --Boundary-00=_OBb0AqGHJZsIJAh Content-Type: text/plain; charset="us-ascii"; boundary="" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello, AbstractJdbc2ResultSet.updateCharacterStream is horribly broken. The attached fixes it for me. Thank you, JdV!! -- -------------------------------------------------------------- Jan de Visser jdevisser@digitalfairway.com Baruk Khazad! Khazad ai-menu! -------------------------------------------------------------- --Boundary-00=_OBb0AqGHJZsIJAh Content-Type: text/x-diff; charset="us-ascii"; name="updateCharacterStream.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="updateCharacterStream.diff" Index: AbstractJdbc2ResultSet.java =================================================================== RCS file: /usr/local/cvsroot/pgjdbc/pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java,v retrieving revision 1.38 diff -u -3 -p -r1.38 AbstractJdbc2ResultSet.java --- AbstractJdbc2ResultSet.java 16 Jun 2004 05:10:15 -0000 1.38 +++ AbstractJdbc2ResultSet.java 17 Jun 2004 14:49:49 -0000 @@ -957,7 +957,7 @@ public abstract class AbstractJdbc2Resul ) throws SQLException { - char[] theData = null; + char[] theData = new char[ length ]; try { x.read(theData, 0, length); @@ -971,7 +971,7 @@ public abstract class AbstractJdbc2Resul { throw new PSQLException("postgresql.updateable.ioerror", null, ie); } - updateValue(columnIndex, theData); + updateValue(columnIndex, new String( theData ) ); } --Boundary-00=_OBb0AqGHJZsIJAh--