#1116 ResultSet and Statement not properly cleaned up in JDBCXYDataset.executeQuery()

1.0.x
open
nobody
None
5
2013-07-31
2013-07-31
David Tonhofer
No

The compiler reveals:

In "JDBCXYDataset.executeQuery()", at line 282:

            catch (SQLException e) {
                columnTypes[column] = Types.NULL;
                throw e;
            }

Resource leak:

"resultSet" is not closed at this location
"statement" is not closed at this location

Clearly, one needs imbricated try/finally.

(Tell me if you want appropriate code :-)

Discussion