List:Commits« Previous MessageNext Message »
From:mmatthews Date:December 19 2007 2:48pm
Subject:Connector/J commit: r6701 - in branches/branch_5_1/src: com/mysql/jdbc com/mysql/jdbc/jdbc2/optional testsuite/regression
View as plain text  
Modified:
   branches/branch_5_1/src/com/mysql/jdbc/ConnectionImpl.java
   branches/branch_5_1/src/com/mysql/jdbc/DatabaseMetaData.java
   branches/branch_5_1/src/com/mysql/jdbc/jdbc2/optional/MysqlXADataSource.java
   branches/branch_5_1/src/testsuite/regression/ConnectionRegressionTest.java
Log:
Small cleanups.

Modified: branches/branch_5_1/src/com/mysql/jdbc/ConnectionImpl.java
===================================================================
--- branches/branch_5_1/src/com/mysql/jdbc/ConnectionImpl.java	2007-12-18 16:30:42 UTC (rev 6700)
+++ branches/branch_5_1/src/com/mysql/jdbc/ConnectionImpl.java	2007-12-19 14:48:27 UTC (rev 6701)
@@ -775,13 +775,13 @@
 		if (histogramCounts == null) {
 			createInitialHistogram(histogramBreakpoints,
 					currentLowerBound, currentUpperBound);
-		}
-
-		for (int i = 0; i < HISTOGRAM_BUCKETS; i++) {
-			if (histogramBreakpoints[i] >= value) {
-				histogramCounts[i] += numberOfTimes;
-
-				break;
+		} else {
+			for (int i = 0; i < HISTOGRAM_BUCKETS; i++) {
+				if (histogramBreakpoints[i] >= value) {
+					histogramCounts[i] += numberOfTimes;
+	
+					break;
+				}
 			}
 		}
 	}

Modified: branches/branch_5_1/src/com/mysql/jdbc/DatabaseMetaData.java
===================================================================
--- branches/branch_5_1/src/com/mysql/jdbc/DatabaseMetaData.java	2007-12-18 16:30:42 UTC (rev 6700)
+++ branches/branch_5_1/src/com/mysql/jdbc/DatabaseMetaData.java	2007-12-19 14:48:27 UTC (rev 6701)
@@ -1090,7 +1090,7 @@
 				int lastParenIndex = line.lastIndexOf(")");
 	
 				if (lastParenIndex != (line.length() - 1)) {
-					String cascadeOptions = cascadeOptions = line
+					String cascadeOptions = line
 							.substring(lastParenIndex + 1);
 					commentBuf.append(" ");
 					commentBuf.append(cascadeOptions);

Modified: branches/branch_5_1/src/com/mysql/jdbc/jdbc2/optional/MysqlXADataSource.java
===================================================================
--- branches/branch_5_1/src/com/mysql/jdbc/jdbc2/optional/MysqlXADataSource.java	2007-12-18 16:30:42 UTC (rev 6700)
+++ branches/branch_5_1/src/com/mysql/jdbc/jdbc2/optional/MysqlXADataSource.java	2007-12-19 14:48:27 UTC (rev 6701)
@@ -52,10 +52,10 @@
 	/**
 	 * @see javax.sql.XADataSource#getXAConnection(String, String)
 	 */
-	public XAConnection getXAConnection(String user, String password)
+	public XAConnection getXAConnection(String u, String p)
 			throws SQLException {
 
-		Connection conn = getConnection(user, password);
+		Connection conn = getConnection(u, p);
 
 		return wrapConnection(conn);
 	}

Modified: branches/branch_5_1/src/testsuite/regression/ConnectionRegressionTest.java
===================================================================
--- branches/branch_5_1/src/testsuite/regression/ConnectionRegressionTest.java	2007-12-18 16:30:42 UTC (rev 6700)
+++ branches/branch_5_1/src/testsuite/regression/ConnectionRegressionTest.java	2007-12-19 14:48:27 UTC (rev 6701)
@@ -2202,7 +2202,8 @@
     		break;
     	case 3:
     		hostsString = firstHost + "," + badHost;
-    		default:
+    		break;
+    	default:
     			throw new IllegalArgumentException();
     	}
     	

Thread
Connector/J commit: r6701 - in branches/branch_5_1/src: com/mysql/jdbc com/mysql/jdbc/jdbc2/optional testsuite/regressionmmatthews19 Dec