Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F1F310BA2 for ; Tue, 3 Dec 2013 11:22:49 +0000 (UTC) Received: (qmail 33029 invoked by uid 500); 3 Dec 2013 11:22:32 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 32960 invoked by uid 500); 3 Dec 2013 11:22:30 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 32949 invoked by uid 99); 3 Dec 2013 11:22:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Dec 2013 11:22:25 +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; Tue, 03 Dec 2013 11:22:24 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 54E572388A3D; Tue, 3 Dec 2013 11:22:04 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1547344 - /commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TestPoolableConnection.java Date: Tue, 03 Dec 2013 11:22:04 -0000 To: commits@commons.apache.org From: markt@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131203112204.54E572388A3D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: markt Date: Tue Dec 3 11:22:03 2013 New Revision: 1547344 URL: http://svn.apache.org/r1547344 Log: Use generics in this unit test Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TestPoolableConnection.java Modified: commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TestPoolableConnection.java URL: http://svn.apache.org/viewvc/commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TestPoolableConnection.java?rev=1547344&r1=1547343&r2=1547344&view=diff ============================================================================== --- commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TestPoolableConnection.java (original) +++ commons/proper/dbcp/trunk/src/test/org/apache/commons/dbcp2/TestPoolableConnection.java Tue Dec 3 11:22:03 2013 @@ -40,7 +40,7 @@ public class TestPoolableConnection exte return new TestSuite(TestPoolableConnection.class); } - private ObjectPool pool = null; + private ObjectPool pool = null; @Override public void setUp() throws Exception { @@ -50,13 +50,13 @@ public class TestPoolableConnection exte factory.setDefaultAutoCommit(true); factory.setDefaultReadOnly(true); - pool = new GenericObjectPool(factory); + pool = new GenericObjectPool<>(factory); factory.setPool(pool); } public void testConnectionPool() throws Exception { // Grab a new connection from the pool - Connection c = (Connection)pool.borrowObject(); + Connection c = pool.borrowObject(); assertNotNull("Connection should be created and should not be null", c); assertEquals("There should be exactly one active object in the pool", 1, pool.getNumActive()); @@ -71,7 +71,7 @@ public class TestPoolableConnection exte // delegated connection closes itself. public void testPoolableConnectionLeak() throws Exception { // 'Borrow' a connection from the pool - Connection conn = (Connection)pool.borrowObject(); + Connection conn = pool.borrowObject(); // Now close our innermost delegate, simulating the case where the // underlying connection closes itself