修正因为SqlStat OOM防止措施导致的空指针问题

This commit is contained in:
wenshao
2011-11-16 10:10:30 +08:00
parent 6ab288b255
commit 8c5bb64929
3 changed files with 45 additions and 16 deletions
@@ -49,6 +49,7 @@ public class TestPoolPreparedStatement extends TestCase {
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement("SELECT ?");
raw = stmt.unwrap(MockPreparedStatement.class);
stmt.execute();
stmt.close();
conn.close();
}
@@ -57,6 +58,7 @@ public class TestPoolPreparedStatement extends TestCase {
Connection conn = dataSource.getConnection();
PreparedStatement stmt = conn.prepareStatement("SELECT ?");
Assert.assertTrue(raw == stmt.unwrap(MockPreparedStatement.class));
stmt.execute();
stmt.close();
conn.close();
}