Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit17b6baf

Browse files
author
Dave Cramer
committed
Doug Fields patch to prevent exception being thrown on zero length arrays
1 parentfe4e95f commit17b6baf

File tree

1 file changed

+7
-1
lines changed
  • src/interfaces/jdbc/org/postgresql/jdbc2

1 file changed

+7
-1
lines changed

‎src/interfaces/jdbc/org/postgresql/jdbc2/Array.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ public Object getArray(long index, int count, Map map) throws SQLException
7474
ObjectretVal =null;
7575

7676
ArrayListarray =newArrayList();
77-
if (rawString !=null )
77+
78+
/* Check if the String is also not an empty array
79+
* otherwise there will be an exception thrown below
80+
* in the ResultSet.toX with an empty string.
81+
* -- Doug Fields <dfields-pg-jdbc@pexicom.com> Feb 20, 2002 */
82+
83+
if (rawString !=null && !rawString.equals("{}") )
7884
{
7985
char[]chars =rawString.toCharArray();
8086
StringBuffersbuf =newStringBuffer();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp