Commit 3db155e
committed
Don't get Statement from closed ResultSet
It's possible that getConnectionFromSqlObject is called on a ResultSet that is already closed,
e.g. in DefaultConnectionPlugin when calling .close on a ResultSet. With some implementations,
such as PgResultSet, calling getStatement on a closed ResultSet throws an SQLException. There is a
performance overhead associated with creating and catching these exceptions everytime a ResultSet is
used, and closed, so it should be avoided.1 parent d0a246e commit 3db155e
File tree
2 files changed
+11
-1
lines changed- wrapper/src
- main/java/software/amazon/jdbc/util
- test/java/software/amazon/jdbc/util
2 files changed
+11
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
579 | 579 | | |
580 | 580 | | |
581 | 581 | | |
582 | | - | |
| 582 | + | |
583 | 583 | | |
584 | 584 | | |
585 | 585 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
163 | 173 | | |
164 | 174 | | |
165 | 175 | | |
| |||
0 commit comments