mirror of
https://github.com/postgres/postgres.git
synced 2025-04-25 21:42:33 +03:00
Doug Fields patch to prevent exception being thrown on zero length arrays
This commit is contained in:
parent
fe4e95f682
commit
17b6baf17d
@ -74,7 +74,13 @@ public class Array implements java.sql.Array
|
|||||||
Object retVal = null;
|
Object retVal = null;
|
||||||
|
|
||||||
ArrayList array = new ArrayList();
|
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 <dfields-pg-jdbc@pexicom.com> Feb 20, 2002 */
|
||||||
|
|
||||||
|
if ( rawString != null && !rawString.equals("{}") )
|
||||||
{
|
{
|
||||||
char[] chars = rawString.toCharArray();
|
char[] chars = rawString.toCharArray();
|
||||||
StringBuffer sbuf = new StringBuffer();
|
StringBuffer sbuf = new StringBuffer();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user