提交 85328719 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

An attempt to fix NPE in TestCrashAPI

上级 3eb61303
...@@ -1236,6 +1236,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements ...@@ -1236,6 +1236,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements
try { try {
super.close(); super.close();
batchParameters = null; batchParameters = null;
batchIdentities = null;
if (command != null) { if (command != null) {
command.close(); command.close();
command = null; command = null;
...@@ -1312,6 +1313,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements ...@@ -1312,6 +1313,7 @@ public class JdbcPreparedStatement extends JdbcStatement implements
if (isDebugEnabled()) { if (isDebugEnabled()) {
debugCodeAssign("ResultSet", TraceObject.RESULT_SET, id, "getGeneratedKeys()"); debugCodeAssign("ResultSet", TraceObject.RESULT_SET, id, "getGeneratedKeys()");
} }
checkClosed();
generatedKeys = new JdbcResultSet(conn, this, null, batchIdentities.getResult(), id, false, true, false); generatedKeys = new JdbcResultSet(conn, this, null, batchIdentities.getResult(), id, false, true, false);
} }
return super.getGeneratedKeys(); return super.getGeneratedKeys();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论