summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarry Lind <barry@xythos.com>2003-03-08 06:09:37 +0000
committerBarry Lind <barry@xythos.com>2003-03-08 06:09:37 +0000
commit899c7110706085ad9fd38548eec8ba15c9b73f2f (patch)
tree14144f9425efc328921c1aa9f1e262cca202cf5d /src
parentf069bd0560cbb05b48f6b47208529406ff0a5755 (diff)
Back ported patches from head to 7.3 branch (fixes for NPE in result set absolute() and NPE when logging enabled)
Modified Files: Tag: REL7_3_STABLE jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java jdbc/org/postgresql/util/PSQLException.java
Diffstat (limited to 'src')
-rw-r--r--src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java6
-rw-r--r--src/interfaces/jdbc/org/postgresql/util/PSQLException.java2
2 files changed, 6 insertions, 2 deletions
diff --git a/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java b/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
index 6ce4ed4b033..26515c361c9 100644
--- a/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
+++ b/src/interfaces/jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
@@ -15,7 +15,7 @@ import org.postgresql.util.PGbytea;
import org.postgresql.util.PSQLException;
-/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.10.2.1 2003/02/24 16:38:25 barry Exp $
+/* $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Attic/AbstractJdbc2ResultSet.java,v 1.10.2.2 2003/03/08 06:09:37 barry Exp $
* This class defines methods of the jdbc2 specification. This class extends
* org.postgresql.jdbc1.AbstractJdbc1ResultSet which provides the jdbc1
* methods. The real Statement class (for jdbc2) is org.postgresql.jdbc2.Jdbc2ResultSet
@@ -188,6 +188,10 @@ public abstract class AbstractJdbc2ResultSet extends org.postgresql.jdbc1.Abstra
current_row = internalIndex;
this_row = (byte[][]) rows.elementAt(internalIndex);
+
+ rowBuffer = new byte[this_row.length][];
+ System.arraycopy(this_row, 0, rowBuffer, 0, this_row.length);
+
return true;
}
diff --git a/src/interfaces/jdbc/org/postgresql/util/PSQLException.java b/src/interfaces/jdbc/org/postgresql/util/PSQLException.java
index 46c71fab11f..309306bb26a 100644
--- a/src/interfaces/jdbc/org/postgresql/util/PSQLException.java
+++ b/src/interfaces/jdbc/org/postgresql/util/PSQLException.java
@@ -111,6 +111,6 @@ public class PSQLException extends SQLException
*/
public String toString()
{
- return message;
+ return message != null ? message : "";
}
}