From derby-commits-return-10377-apmail-db-derby-commits-archive=db.apache.org@db.apache.org Wed Jun 11 09:04:03 2008 Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 31724 invoked from network); 11 Jun 2008 09:04:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Jun 2008 09:04:03 -0000 Received: (qmail 42073 invoked by uid 500); 11 Jun 2008 09:04:05 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 42046 invoked by uid 500); 11 Jun 2008 09:04:05 -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 42037 invoked by uid 99); 11 Jun 2008 09:04:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jun 2008 02:04:05 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Wed, 11 Jun 2008 09:03:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BEA3023889BA; Wed, 11 Jun 2008 02:03:41 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r666583 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionKeyTest.java Date: Wed, 11 Jun 2008 09:03:41 -0000 To: derby-commits@db.apache.org From: kristwaa@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080611090341.BEA3023889BA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kristwaa Date: Wed Jun 11 02:03:41 2008 New Revision: 666583 URL: http://svn.apache.org/viewvc?rev=666583&view=rev Log: (DERBY-1001): Removed two unused imports and renamed a local variable hiding an instance variable. Patch file: n/a Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionKeyTest.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionKeyTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionKeyTest.java?rev=666583&r1=666582&r2=666583&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionKeyTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/EncryptionKeyTest.java Wed Jun 11 02:03:41 2008 @@ -33,8 +33,6 @@ import java.security.AccessController; import java.security.PrivilegedAction; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; import org.apache.derbyTesting.junit.BaseJDBCTestCase; import org.apache.derbyTesting.junit.JDBCDataSource; @@ -616,8 +614,8 @@ */ protected Connection createAndPopulateDB(String dbName) throws SQLException { - Connection con = getConnection(dbName, CORRECT_KEY); - SQLWarning warning = con.getWarnings(); + Connection newCon = getConnection(dbName, CORRECT_KEY); + SQLWarning warning = newCon.getWarnings(); // If the database already exists, fail the test. if (warning != null) { if ("01J01".equals(warning.getSQLState())) { @@ -625,11 +623,11 @@ warning.getMessage() + ">"); } } - Statement stmt = con.createStatement(); + Statement stmt = newCon.createStatement(); stmt.executeUpdate("CREATE TABLE " + TABLE + " (id int NOT NULL, " + "val int NOT NULL, PRIMARY KEY(id))"); stmt.close(); - PreparedStatement ps = con.prepareStatement("INSERT INTO " + TABLE + + PreparedStatement ps = newCon.prepareStatement("INSERT INTO " + TABLE + " (id, val) VALUES (?,?)"); for (int i=0; i < DATA.length; i++) { ps.setInt(1, i); @@ -637,7 +635,7 @@ ps.executeUpdate(); } ps.close(); - return con; + return newCon; } /**