pgjdbc/pgjdbc — pull request #231 by kingter (2014-12-04 07:06:26+00:00)
Title: Fix test code problem of test case testUpdateWithPGobject

Adding invocation of ResultSet.next() before getting data from the results set.

Found following error when runing the jdbc2TestSuite:
==============================================
[junit] Testcase: testUpdateWithPGobject took 0.351 sec
[junit]	Caused an ERROR
[junit] ResultSet not positioned properly, perhaps you need to call next.
[junit] org.postgresql.util.PSQLException: ResultSet not positioned properly, perhaps you need to call next.
[junit]	at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkResultSet(AbstractJdbc2ResultSet.java:2882)
[junit]	at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getDate(AbstractJdbc2ResultSet.java:449)
[junit]	at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getDate(AbstractJdbc2ResultSet.java:2620)
[junit]	at org.postgresql.test.jdbc2.ResultSetTest.testUpdateWithPGobject(ResultSetTest.java:737)
==============================================

The error due to the cursor of result had not been point to the first row while trying to get data from the result set.
Fixed the issue by invoking ResultSet.next() before get any data from it.