db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krist...@apache.org
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 GMT
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;
     }
 
     /**



Mime
View raw message