[CONJ-971] A static analysis has found a resource leak Created: 2022-05-09 Updated: 2022-05-13 Resolved: 2022-05-13 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | Other |
| Affects Version/s: | 3.0.3, 3.0.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Minor |
| Reporter: | Zuzana Miklankova | Assignee: | Diego Dupin |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The static analysis tool found a possible resource leak, which I am not sure if it is a false positive or not: src/main/java/org/mariadb/jdbc/pool/Pool.java: I could not find any piece of code, that would close this resource. The Statement close() method docs[1] tells us, that it is only a good practice to close the resource manually, with, in this case, stmt.close(). Can you please check, if this finding is reasonable, or not? [1] https://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#close-- |
| Comments |
| Comment by Diego Dupin [ 2022-05-13 ] |
|
Statement close is a good practice, yes. In this case, Statement won't do anything on close, so no need to change current implementation. Still good check. |
| Comment by Zuzana Miklankova [ 2022-05-13 ] |
|
Thank you for checking! |