getArray() fails to handle some string array cases

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: getArray() fails to handle some string array cases
Date: 2003-07-20 13:33:27
Message-ID: 20030720133327.GK32403@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

While playing with an implementation of setArray() I've found a case where
the existing getArray() implementation does not parse an array result
correctly. The attached testcase produces:

[junit] Testcase: testStringArray(org.postgresql.test.jdbc2.GetArrayTest): FAILED
[junit] driver element 2: expected:<"> but was:<,',\>
[junit] junit.framework.AssertionFailedError: driver element 2: expected:<"> but was:<,',\>
[junit] at org.postgresql.test.jdbc2.GetArrayTest.testStringArray(GetArrayTest.java:125)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

I'm not going to have time to track the cause of this down, but maybe the
testcase is useful to someone else.

-O

Attachment Content-Type Size
GetArrayTest.java text/x-java 4.9 KB

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dima Tkach 2003-07-20 16:33:19 Re: getArray() fails to handle some string array cases
Previous Message Paul Thomas 2003-07-20 13:10:26 Re: jdbc batch performance problem