List:Internals« Previous MessageNext Message »
From:mmatthews Date:November 2 2005 4:11am
Subject:Connector/J commit: r4503 - in branches/branch_3_1/connector-j: . src/com/mysql/jdbc
View as plain text  
Modified:
   branches/branch_3_1/connector-j/CHANGES
   branches/branch_3_1/connector-j/src/com/mysql/jdbc/NonRegisteringDriver.java
Log:
Fall back to platform-encoding for URLDecoder.decode() when
      parsing driver URL properties if the platform doesn't have a 
      two-argument version of this method.

Modified: branches/branch_3_1/connector-j/CHANGES
===================================================================
--- branches/branch_3_1/connector-j/CHANGES	2005-11-02 04:10:04 UTC (rev 4502)
+++ branches/branch_3_1/connector-j/CHANGES	2005-11-02 04:11:48 UTC (rev 4503)
@@ -10,6 +10,10 @@
     - Don't allow executeBatch() for CallableStatements with registered
       OUT/INOUT parameters (JDBC compliance).
       
+    - Fall back to platform-encoding for URLDecoder.decode() when
+      parsing driver URL properties if the platform doesn't have a 
+      two-argument version of this method.
+      
 10-07-05 - Version 3.1.11
 
     - Fixed BUG#11629 - Spurious "!" on console when character

Modified: branches/branch_3_1/connector-j/src/com/mysql/jdbc/NonRegisteringDriver.java
===================================================================
--- branches/branch_3_1/connector-j/src/com/mysql/jdbc/NonRegisteringDriver.java	2005-11-02 04:10:04 UTC (rev 4502)
+++ branches/branch_3_1/connector-j/src/com/mysql/jdbc/NonRegisteringDriver.java	2005-11-02 04:11:48 UTC (rev 4503)
@@ -476,10 +476,14 @@
 				if ((value != null && value.length() > 0) && 
 						(parameter != null && parameter.length() > 0)) {
 					try {
-						urlProps.put(parameter, URLDecoder.decode(value, "UTF-8"));
+						urlProps.put(parameter, URLDecoder.decode(value,
+								"UTF-8"));
 					} catch (UnsupportedEncodingException badEncoding) {
 						// punt
-						urlProps.put(parameter, value);
+						urlProps.put(parameter, URLDecoder.decode(value));
+					} catch (NoSuchMethodError nsme) {
+						// punt again
+						urlProps.put(parameter,  URLDecoder.decode(value));
 					}
 				}
 			}

Thread
Connector/J commit: r4503 - in branches/branch_3_1/connector-j: . src/com/mysql/jdbcmmatthews2 Nov