You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by my...@apache.org on 2014/06/12 19:05:30 UTC
svn commit: r1602232 - in /db/derby/code/trunk/java:
engine/org/apache/derby/impl/io/JarStorageFactory.java
testing/org/apache/derbyTesting/functionTests/tests/lang/DBInJarTest.java
Author: myrnavl
Date: Thu Jun 12 17:05:30 2014
New Revision: 1602232
URL: http://svn.apache.org/r1602232
Log:
DERBY-4381; Connection to Derby database using jar subprotocol doesn't work if the path has round bracket in it
fixing formatting, comments, and removing an unnecessary import
Modified:
db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java
db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBInJarTest.java
Modified: db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java?rev=1602232&r1=1602231&r2=1602232&view=diff
==============================================================================
--- db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java (original)
+++ db/derby/code/trunk/java/engine/org/apache/derby/impl/io/JarStorageFactory.java Thu Jun 12 17:05:30 2014
@@ -25,7 +25,6 @@ import java.io.File;
import java.io.IOException;
import java.util.zip.ZipFile;
-import org.apache.derby.iapi.services.info.JVMInfo;
import org.apache.derby.io.StorageFile;
/**
Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBInJarTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBInJarTest.java?rev=1602232&r1=1602231&r2=1602232&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBInJarTest.java (original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/DBInJarTest.java Thu Jun 12 17:05:30 2014
@@ -104,14 +104,15 @@ public class DBInJarTest extends BaseJDB
/**
* Test for fix of DERBY-4381, by testing the connection to a jar
- * with a param in the name. DERBY-4381 describes the problem when
- * the param is in the path, but the cause is the same
+ * with a closing parenthesis / round bracket in the name.
+ * DERBY-4381 describes the problem when this round bracket
+ * is in the path, but the cause is the same.
*/
- public void testConnectParamDBInJar() throws SQLException
+ public void testConnectParenDBInJar() throws SQLException
{
// Create database to be jarred up.
-
- Connection beforejarconn = DriverManager.getConnection("jdbc:derby:testparjardb;create=true");
+ Connection beforejarconn = DriverManager.getConnection(
+ "jdbc:derby:testparjardb;create=true");
Statement bjstmt = beforejarconn.createStatement();
bjstmt.executeUpdate("CREATE TABLE PARTAB (I INT)");
bjstmt.executeUpdate("INSERT INTO PARTAB VALUES(1)");
@@ -129,15 +130,15 @@ public class DBInJarTest extends BaseJDB
ResultSet rs = s.executeQuery("SELECT * from PARTAB");
JDBC.assertSingleValueResultSet(rs, "1");
- shutdownDB("jdbc:derby:jar:(test)jardb.jar)testparjardb;shutdown=true");
-
- // cleanup databases
- File jarredpardb = new File(System.getProperty("derby.system.home")
- + "/test)jardb.jar");
- assertTrue("failed deleting " +
- jarredpardb.getPath(),jarredpardb.delete());
- removeDirectory(new File(System.getProperty("derby.system.home")
- + "/testparjardb" ));
+ shutdownDB("jdbc:derby:jar:(test)jardb.jar)testparjardb;shutdown=true");
+
+ // cleanup databases
+ File jarredpardb = new File(System.getProperty("derby.system.home")
+ + "/test)jardb.jar");
+ assertTrue("failed deleting " +
+ jarredpardb.getPath(),jarredpardb.delete());
+ removeDirectory(new File(System.getProperty("derby.system.home")
+ + "/testparjardb" ));
}