List:Commits« Previous MessageNext Message »
From:eherman Date:February 22 2008 8:04pm
Subject:Connector/J commit: r6736 - trunk/src/com/mysql/jdbc
View as plain text  
Modified:
   trunk/src/com/mysql/jdbc/ConnectionImpl.java
Log:
remove some duplication for newMysqlIO parameters

Modified: trunk/src/com/mysql/jdbc/ConnectionImpl.java
===================================================================
--- trunk/src/com/mysql/jdbc/ConnectionImpl.java	2008-02-21 02:52:52 UTC (rev 6735)
+++ trunk/src/com/mysql/jdbc/ConnectionImpl.java	2008-02-22 20:04:18 UTC (rev 6736)
@@ -2034,11 +2034,7 @@
 								}
 							}
 	
-							this.io = newMysqlIO(newHost, 
-							        newPort, mergedProps, getMysqlIOFactory(),
-									getSocketFactoryClassName(), this,
-									getSocketTimeout(), 
-									this.largeRowSizeThreshold.getValueAsInt());
+							this.io = newMysqlIO(newHost, newPort, mergedProps);
 		
 							this.io.doHandshake(this.user, this.password,
 									this.database);
@@ -2185,10 +2181,7 @@
 								}
 	
 								this.io = newMysqlIO(newHost, newPort,
-										mergedProps, getMysqlIOFactory(),
-										getSocketFactoryClassName(),
-										this, getSocketTimeout(),
-										this.largeRowSizeThreshold.getValueAsInt());
+										mergedProps);
 								this.io.doHandshake(this.user, this.password,
 										this.database);
 								pingInternal(false);
@@ -5497,32 +5490,30 @@
 		ex.init(this, this.props);
 	}
 
-    private MysqlIO newMysqlIO(String host1, int port1, Properties props1,
-        String getMysqlIOFactory, String socketFactoryClassName,
-        ConnectionImpl conn, int socketTimeout, int largeRowSizeThreshold1)
+    private MysqlIO newMysqlIO(String newHost, int newPort, Properties props1)
         throws IOException, SQLException {
 
         Properties mergedProps = new Properties(props1);
-        mergedProps.put(NonRegisteringDriver.HOST_PROPERTY_KEY, host1);
+        mergedProps.put(NonRegisteringDriver.HOST_PROPERTY_KEY, newHost);
 
         mergedProps.put(NonRegisteringDriver.PORT_PROPERTY_KEY, Integer
-            .toString(port1));
+            .toString(newPort));
 
         mergedProps.put(ConnectionPropertiesImpl.SOCKET_FACTORY_PROPERTY_KEY,
-            socketFactoryClassName);
+            getSocketFactoryClassName());
 
         mergedProps.put(
             ConnectionPropertiesImpl.LARGE_ROW_SIZE_THRESHOLD_PROPERTY_KEY,
-            Integer.toString(largeRowSizeThreshold1));
+            Integer.toString(this.largeRowSizeThreshold.getValueAsInt()));
 
         mergedProps.put(ConnectionPropertiesImpl.SOCKET_TIMEOUT_PROPERTY_KEY,
-            Integer.toString(socketTimeout));
+            Integer.toString(getSocketTimeout()));
 
         Class[] argTypes = new Class[] { Properties.class,
             ConnectionImpl.class, };
 
-        Object[] args = new Object[] { mergedProps, conn };
+        Object[] args = new Object[] { mergedProps, this };
 
-        return (MysqlIO) Util.getInstance(getMysqlIOFactory, argTypes, args);
+        return (MysqlIO) Util.getInstance(getMysqlIOFactory(), argTypes, args);
     }
 }

Thread
Connector/J commit: r6736 - trunk/src/com/mysql/jdbceherman22 Feb