projects
/
postgresql.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe4e95f
)
Doug Fields patch to prevent exception being thrown on zero length arrays
author
Dave Cramer
Tue, 5 Mar 2002 03:46:03 +0000
(
03:46
+0000)
committer
Dave Cramer
Tue, 5 Mar 2002 03:46:03 +0000
(
03:46
+0000)
src/interfaces/jdbc/org/postgresql/jdbc2/Array.java
patch
|
blob
|
blame
|
history
diff --git
a/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java
b/src/interfaces/jdbc/org/postgresql/jdbc2/Array.java
index 14948e5b4b07d51f882c11dea3ca27fc3468b4fd..f68106ee7b6958b429642430202e20bb1343f2dd 100644
(file)
--- a/
src/interfaces/jdbc/org/postgresql/jdbc2/Array.java
+++ b/
src/interfaces/jdbc/org/postgresql/jdbc2/Array.java
@@
-74,7
+74,13
@@
public class Array implements java.sql.Array
Object retVal = null;
ArrayList array = new ArrayList();
- if ( rawString != null )
+
+ /* Check if the String is also not an empty array
+ * otherwise there will be an exception thrown below
+ * in the ResultSet.toX with an empty string.
+ * -- Doug Fields
Feb 20, 2002 */
+
+ if ( rawString != null && !rawString.equals("{}") )
{
char[] chars = rawString.toCharArray();
StringBuffer sbuf = new StringBuffer();