[libpostgresql-jdbc-java] 06/11: Update getObject and getArray methods that take a map to only bail out with a not implemented exception if the supplied map is not null and not empty. Apparently Sun's WebRowSet implementation passes empty Maps to these methods.
Emmanuel Bourg
ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:19:19 UTC 2017
This is an automated email from the git hooks/post-receive script.
ebourg-guest pushed a commit to tag REL8_0_315
in repository libpostgresql-jdbc-java.
commit 3707db81cd929e9cd0e89f06af636009faf58e43
Author: Kris Jurka <books at ejurka.com>
Date: Sun Dec 4 21:41:36 2005 +0000
Update getObject and getArray methods that take a map to only
bail out with a not implemented exception if the supplied map is
not null and not empty. Apparently Sun's WebRowSet implementation
passes empty Maps to these methods.
Report and analysis by Gunnar Stefansson.
---
org/postgresql/jdbc2/AbstractJdbc2Array.java | 4 ++--
org/postgresql/jdbc2/AbstractJdbc2ResultSet.java | 5 ++++-
org/postgresql/jdbc2/AbstractJdbc2Statement.java | 5 ++++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/org/postgresql/jdbc2/AbstractJdbc2Array.java b/org/postgresql/jdbc2/AbstractJdbc2Array.java
index 8d971c9..5bb8777 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2Array.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2Array.java
@@ -3,7 +3,7 @@
* Copyright (c) 2004-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Array.java,v 1.13 2005/01/14 01:20:19 oliver Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Array.java,v 1.13.2.1 2005/02/15 08:55:50 jurka Exp $
*
*-------------------------------------------------------------------------
*/
@@ -84,7 +84,7 @@ public class AbstractJdbc2Array
public Object getArrayImpl(long index, int count, Map map) throws SQLException
{
- if ( map != null ) // For now maps aren't supported.
+ if ( map != null && !map.isEmpty()) // For now maps aren't supported.
throw org.postgresql.Driver.notImplemented(this.getClass(), "getArrayImpl(long,int,Map)");
if (index < 1)
diff --git a/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java b/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
index 849e1fd..2892200 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
@@ -3,7 +3,7 @@
* Copyright (c) 2003-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java,v 1.71.2.5 2005/09/29 22:12:11 jurka Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java,v 1.71.2.6 2005/11/05 09:25:03 jurka Exp $
*
*-------------------------------------------------------------------------
*/
@@ -466,6 +466,9 @@ public abstract class AbstractJdbc2ResultSet implements BaseResultSet, org.postg
public Object getObjectImpl(int i, java.util.Map map) throws SQLException
{
checkClosed();
+ if (map == null || map.isEmpty()) {
+ return getObject(i);
+ }
throw org.postgresql.Driver.notImplemented(this.getClass(), "getObjectImpl(int,Map)");
}
diff --git a/org/postgresql/jdbc2/AbstractJdbc2Statement.java b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
index d754f54..03c1de2 100644
--- a/org/postgresql/jdbc2/AbstractJdbc2Statement.java
+++ b/org/postgresql/jdbc2/AbstractJdbc2Statement.java
@@ -3,7 +3,7 @@
* Copyright (c) 2004-2005, PostgreSQL Global Development Group
*
* IDENTIFICATION
-* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.68.2.9 2005/09/29 20:40:29 jurka Exp $
+* $PostgreSQL: pgjdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java,v 1.68.2.10 2005/10/03 17:26:36 jurka Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2861,6 +2861,9 @@ public abstract class AbstractJdbc2Statement implements BaseStatement
public Object getObjectImpl(int i, java.util.Map map) throws SQLException
{
+ if (map == null || map.isEmpty()) {
+ return getObject(i);
+ }
throw Driver.notImplemented(this.getClass(), "getObjectImpl(int,Map)");
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/libpostgresql-jdbc-java.git
More information about the pkg-java-commits
mailing list