提交 ad70c2cc authored 作者: Thomas Mueller's avatar Thomas Mueller

Spellchecker (./build.sh spellcheck)

上级 42c4f92d
...@@ -85,9 +85,9 @@ public class TestJavaObject extends TestBase { ...@@ -85,9 +85,9 @@ public class TestJavaObject extends TestBase {
} }
} else { } else {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
int cmp = ((Comparable<Object>) o1).compareTo(o2); int compare = ((Comparable<Object>) o1).compareTo(o2);
assertFalse(cmp == 0); assertFalse(compare == 0);
x = cmp < 0 ? o1 : o2; x = compare < 0 ? o1 : o2;
} }
assertEquals(x.toString(), rs.getString(1)); assertEquals(x.toString(), rs.getString(1));
...@@ -98,24 +98,24 @@ public class TestJavaObject extends TestBase { ...@@ -98,24 +98,24 @@ public class TestJavaObject extends TestBase {
assertFalse(rs.next()); assertFalse(rs.next());
rs.close(); rs.close();
PreparedStatement slct = conn.prepareStatement("select id from t where val = ?"); PreparedStatement prep = conn.prepareStatement("select id from t where val = ?");
slct.setObject(1, o1, Types.JAVA_OBJECT); prep.setObject(1, o1, Types.JAVA_OBJECT);
rs = slct.executeQuery(); rs = prep.executeQuery();
assertTrue(rs.next()); assertTrue(rs.next());
assertEquals(1, rs.getInt(1)); assertEquals(1, rs.getInt(1));
assertFalse(rs.next()); assertFalse(rs.next());
rs.close(); rs.close();
slct.setObject(1, o2, Types.JAVA_OBJECT); prep.setObject(1, o2, Types.JAVA_OBJECT);
rs = slct.executeQuery(); rs = prep.executeQuery();
assertTrue(rs.next()); assertTrue(rs.next());
assertEquals(2, rs.getInt(1)); assertEquals(2, rs.getInt(1));
assertFalse(rs.next()); assertFalse(rs.next());
rs.close(); rs.close();
stmt.close(); stmt.close();
slct.close(); prep.close();
conn.close(); conn.close();
deleteDb("javaObject"); deleteDb("javaObject");
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论