ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1636660 - /ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java
Date Tue, 04 Nov 2014 17:28:54 GMT
Author: seanfinan
Date: Tue Nov  4 17:28:53 2014
New Revision: 1636660

URL: http://svn.apache.org/r1636660
Log:
Der.

Modified:
    ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java

Modified: ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java?rev=1636660&r1=1636659&r2=1636660&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/JdbcConnectionFactory.java
Tue Nov  4 17:28:53 2014
@@ -54,7 +54,8 @@ public enum JdbcConnectionFactory {
       String trueJdbcUrl = jdbcUrl;
       if ( jdbcUrl.startsWith( HSQL_FILE_PREFIX ) ) {
          // Hack for hsqldb file needing to be absolute or relative to current working directory
-         final String urlFilePath = jdbcUrl.substring( HSQL_FILE_PREFIX.length() ) + HSQL_DB_EXT;
+         final String urlDbPath = jdbcUrl.substring( HSQL_FILE_PREFIX.length() );
+         final String urlFilePath = urlDbPath + HSQL_DB_EXT;
          File file = new File( urlFilePath );
          if ( !file.exists() ) {
             // file url is not absolute, check for relative directly under current working
directory
@@ -65,7 +66,7 @@ public enum JdbcConnectionFactory {
                final String cwdParent = new File( cwd ).getParent();
                file = new File( cwdParent, urlFilePath );
                if ( file.exists() ) {
-                  trueJdbcUrl = "../" + jdbcUrl;
+                  trueJdbcUrl = HSQL_FILE_PREFIX + "../" + urlDbPath;
                } else {
                   LOGGER.error( "Could not find " + urlFilePath + " as absolute or in " +
cwd + " or in " + cwdParent );
                   throw new SQLException( "No HsqlDB script file exists at Url" );



Mime
View raw message