[libpostgresql-jdbc-java] 15/128: Remove testSetObjectFromJavaArray from jdbc2

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Mon Jan 9 10:18:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to annotated tag REL9_3_1100
in repository libpostgresql-jdbc-java.

commit 94fee339b0ebf9254022536ac2cfebbd30955ccc
Author: Dave Cramer <davecramer at gmail.com>
Date:   Thu Nov 1 21:14:04 2012 -0400

    Remove testSetObjectFromJavaArray from jdbc2
---
 org/postgresql/test/jdbc2/ArrayTest.java | 31 +------------------------------
 1 file changed, 1 insertion(+), 30 deletions(-)

diff --git a/org/postgresql/test/jdbc2/ArrayTest.java b/org/postgresql/test/jdbc2/ArrayTest.java
index 7b796be..0f1d7e4 100644
--- a/org/postgresql/test/jdbc2/ArrayTest.java
+++ b/org/postgresql/test/jdbc2/ArrayTest.java
@@ -186,36 +186,7 @@ public class ArrayTest extends TestCase
         assertEquals(3, resultCount);
     }
 
-    public void testSetObjectFromJavaArray() throws SQLException {
-        String[] strArray = new String[]{"a","b","c"};
-
-        PreparedStatement pstmt = conn.prepareStatement("INSERT INTO arrtest(strarr) VALUES (?)");
-
-        // Incorrect, but commonly attempted by many ORMs:
-        try {
-            pstmt.setObject(1, strArray, Types.ARRAY);
-            pstmt.executeUpdate();
-            fail("setObject() with a Java array parameter and Types.ARRAY shouldn't succeed");
-        } catch (org.postgresql.util.PSQLException ex) {
-            // Expected failure.
-        }
-
-        // Also incorrect, but commonly attempted by many ORMs:
-        try {
-            pstmt.setObject(1, strArray);
-            pstmt.executeUpdate();
-            fail("setObject() with a Java array parameter and no Types argument shouldn't succeed");
-        } catch (org.postgresql.util.PSQLException ex) {
-            // Expected failure.
-        }
-
-        // Correct way, though the use of "text" as a type is non-portable.
-        Array sqlArray = conn.createArrayOf("text", strArray);
-        pstmt.setArray(1, sqlArray);
-        pstmt.executeUpdate();
-
-        pstmt.close();
-    }
+    
 
     /**
      * Starting with 8.0 non-standard (beginning index isn't 1) bounds

-- 
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