Skip to content

Commit 6493dda

Browse files
committed
Minor correction. Cursor status should be changed to CLOSED even if ResultSet#close() threw an exception.
1 parent 8892890 commit 6493dda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/org/apache/ibatis/cursor/defaults/DefaultCursor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ public void close() {
114114
if (rs != null) {
115115
rs.close();
116116
}
117-
status = CursorStatus.CLOSED;
118117
} catch (SQLException e) {
119118
// ignore
119+
} finally {
120+
status = CursorStatus.CLOSED;
120121
}
121122
}
122123

0 commit comments

Comments
 (0)