Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 42349 invoked from network); 21 Mar 2011 00:25:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Mar 2011 00:25:33 -0000 Received: (qmail 4640 invoked by uid 500); 21 Mar 2011 00:25:33 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 4616 invoked by uid 500); 21 Mar 2011 00:25:33 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 4609 invoked by uid 99); 21 Mar 2011 00:25:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 00:25:33 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Mar 2011 00:25:31 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CBA1F238896F; Mon, 21 Mar 2011 00:25:07 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1083628 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ConnectionTest.java Date: Mon, 21 Mar 2011 00:25:07 -0000 To: derby-commits@db.apache.org From: kahatlen@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110321002507.CBA1F238896F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kahatlen Date: Mon Mar 21 00:25:07 2011 New Revision: 1083628 URL: http://svn.apache.org/viewvc?rev=1083628&view=rev Log: DERBY-4869: Fixed compiler warnings and removed unnecessary try/catch in test case for getTypeMap() Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ConnectionTest.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ConnectionTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ConnectionTest.java?rev=1083628&r1=1083627&r2=1083628&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ConnectionTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbc4/ConnectionTest.java Mon Mar 21 00:25:07 2011 @@ -26,15 +26,11 @@ import org.apache.derbyTesting.functionT import org.apache.derbyTesting.junit.BaseJDBCTestCase; import org.apache.derbyTesting.junit.TestConfiguration; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.OutputStream; import java.sql.*; import java.util.ArrayList; +import java.util.List; import java.util.Map; import java.util.Properties; -import javax.sql.*; /** * Tests for the JDBC 4.0 specific methods in the connection object(s). @@ -192,7 +188,7 @@ public class ConnectionTest * Tests that getTypeMap() returns the input map * @exception SQLException if an error occurs */ - public void testGetTypeMapReturnsasExcepted() throws SQLException { + public void testGetTypeMapReturnsAsExpected() throws SQLException { Statement s = getConnection().createStatement(); int ret; try { @@ -209,7 +205,7 @@ public class ConnectionTest PreparedStatement ps = getConnection().prepareStatement( "INSERT INTO T1(A1) VALUES (?)"); - ArrayList lst = new ArrayList(); + ArrayList lst = new ArrayList(); lst.add("First element"); lst.add("Second element"); @@ -217,12 +213,7 @@ public class ConnectionTest ps.execute(); Map> map = getConnection().getTypeMap(); - try { - map.put("JAVA_UTIL_LIST", Class.forName("java.util.List")); - } catch (ClassNotFoundException se) { - se.printStackTrace(); - println("map.put has exception"); - } + map.put("JAVA_UTIL_LIST", List.class); try { getConnection().setTypeMap(map);