db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r219256 - in /incubator/derby/code/trunk/java/client/org/apache/derby: client/am/Connection.java jdbc/ClientBaseDataSource.java
Date Fri, 15 Jul 2005 23:01:02 GMT
Author: djd
Date: Fri Jul 15 16:01:02 2005
New Revision: 219256

URL: http://svn.apache.org/viewcvs?rev=219256&view=rev
Log:
DERBY-409  This is a potential patch for the issue brought up in DERBY-406
connectionAttributes will now default to null (aka no default) 

Patch contributed by Philip Wilder 050503w@acadiau.ca

Modified:
    incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
    incubator/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java

Modified: incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java?rev=219256&r1=219255&r2=219256&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java (original)
+++ incubator/derby/code/trunk/java/client/org/apache/derby/client/am/Connection.java Fri
Jul 15 16:01:02 2005
@@ -156,7 +156,11 @@
 
         // Extract common properties.
         // Derby-409 fix
-        databaseName_ = dataSource.getDatabaseName() + ";" + dataSource.getConnectionAttributes();
+        if (dataSource.getConnectionAttributes() != null) {
+            databaseName_ = dataSource.getDatabaseName() + ";" + dataSource.getConnectionAttributes();
+        } else {
+            databaseName_ = dataSource.getDatabaseName();
+        }
         retrieveMessageText_ = dataSource.getRetrieveMessageText();
 
         loginTimeout_ = dataSource.getLoginTimeout();

Modified: incubator/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java?rev=219256&r1=219255&r2=219256&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java
(original)
+++ incubator/derby/code/trunk/java/client/org/apache/derby/jdbc/ClientBaseDataSource.java
Fri Jul 15 16:01:02 2005
@@ -782,7 +782,7 @@
         return getUpgradedSecurityMechanism(securityMechanism, password);
     }
 
-    protected String connectionAttributes = "";
+    protected String connectionAttributes = null;
 
     /**
      * Set this property to pass in more Derby specific connection URL attributes.
@@ -880,6 +880,10 @@
      * when set connection attributes is called.
      */
     void updateDataSourceValues(Properties prop) {
+        if (prop == null) {
+            return;
+        }
+        
         if (prop.containsKey(propertyKey_user)) {
             setUser(getUser(prop));
         }



Mime
View raw message