浏览代码

add close(ResultSet) method

James 5 年之前
父节点
当前提交
021c3471fc
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/main/java/com/jfinal/plugin/activerecord/DbKit.java

+ 4 - 0
src/main/java/com/jfinal/plugin/activerecord/DbKit.java

@@ -114,6 +114,10 @@ public final class DbKit {
 		if (st != null) {st.close();}
 	}
 	
+	static final void close(ResultSet rs) throws SQLException {
+		if (rs != null) {rs.close();}
+	}
+	
 	static final void close(Statement st) throws SQLException {
 		if (st != null) {st.close();}
 	}