Merge branch 'stable-2.7' into stable-2.8

* stable-2.7:
  Bump JSch to 1.5.0 to fix Java7 compatibility
  Extend AddBranchResult with toString method implementation
  Get rid of JdbcSQLException while numbers are read from cache

Conflicts:
	gerrit-common/src/main/java/com/google/gerrit/common/data/AddBranchResult.java
	pom.xml

Change-Id: Ic3bae80a40bfa2d8e8eee598bcdbd771b99cbeda
This commit is contained in:
Shawn Pearce
2013-11-05 11:15:47 -08:00
2 changed files with 5 additions and 4 deletions

View File

@@ -28,6 +28,7 @@ import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.sql.Types;
import java.util.Calendar; import java.util.Calendar;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ArrayBlockingQueue; import java.util.concurrent.ArrayBlockingQueue;
@@ -268,7 +269,7 @@ public class H2CacheImpl<K, V> extends AbstractLoadingCache<K, V> {
} }
void set(PreparedStatement ps, int col, K value) throws SQLException { void set(PreparedStatement ps, int col, K value) throws SQLException {
ps.setObject(col, value); ps.setObject(col, value, Types.JAVA_OBJECT);
} }
Funnel<K> funnel() { Funnel<K> funnel() {
@@ -489,7 +490,7 @@ public class H2CacheImpl<K, V> extends AbstractLoadingCache<K, V> {
} }
try { try {
keyType.set(c.put, 1, key); keyType.set(c.put, 1, key);
c.put.setObject(2, holder.value); c.put.setObject(2, holder.value, Types.JAVA_OBJECT);
c.put.setTimestamp(3, new Timestamp(holder.created)); c.put.setTimestamp(3, new Timestamp(holder.created));
c.put.setTimestamp(4, TimeUtil.nowTs()); c.put.setTimestamp(4, TimeUtil.nowTs());
c.put.executeUpdate(); c.put.executeUpdate();

View File

@@ -106,8 +106,8 @@ maven_jar(
maven_jar( maven_jar(
name = 'jsch', name = 'jsch',
id = 'com.jcraft:jsch:0.1.44-1', id = 'com.jcraft:jsch:0.1.50',
sha1 = '2e9ae08de5a71bd0e0d3ba2558598181bfa71d4e', sha1 = 'fae4a0b1f2a96cb8f58f38da2650814c991cea01',
license = 'jsch', license = 'jsch',
) )