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:
commit
f5016f461b
@ -28,6 +28,7 @@ import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.sql.Timestamp;
|
||||
import java.sql.Types;
|
||||
import java.util.Calendar;
|
||||
import java.util.Map;
|
||||
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 {
|
||||
ps.setObject(col, value);
|
||||
ps.setObject(col, value, Types.JAVA_OBJECT);
|
||||
}
|
||||
|
||||
Funnel<K> funnel() {
|
||||
@ -489,7 +490,7 @@ public class H2CacheImpl<K, V> extends AbstractLoadingCache<K, V> {
|
||||
}
|
||||
try {
|
||||
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(4, TimeUtil.nowTs());
|
||||
c.put.executeUpdate();
|
||||
|
Loading…
Reference in New Issue
Block a user