Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b29cbe5
Add JdbcResourceLeak tests for JDBC resource management
parameshn Feb 6, 2026
68905ac
Add resource leak detection tests for RowSet types
parameshn Feb 6, 2026
5ca2cf8
Test: fix misplaced error annotations in JDBC resource leak tests
parameshn Feb 6, 2026
9d2816e
Test: fix misplaced error annotations in JDBC resource leak tests
parameshn Feb 6, 2026
76273bd
Test: add nested ResultSet leak scenario
parameshn Feb 6, 2026
235fc12
Fix: comment formatting in RowSetResourceLeak test
parameshn Feb 6, 2026
87f4485
Test: cover scenario where both CachedRowSet and ResultSet are unclosed
parameshn Feb 6, 2026
c431545
Update RowSetResourceLeak.java
parameshn Feb 6, 2026
ac2c32e
Merge branch 'master' into mustcall-jdbc-types
mernst Feb 9, 2026
e9015cb
Merge ../checker-framework-branch-master into mustcall-jdbc-types
mernst Mar 3, 2026
87c99d2
Merge ../checker-framework-branch-master into mustcall-jdbc-types
mernst Mar 3, 2026
d0e7c3f
Merge ../checker-framework-branch-master into mustcall-jdbc-types
mernst Mar 4, 2026
2759b85
Put error message key in brackets
mernst Mar 4, 2026
799d156
Merge branch 'master' into mustcall-jdbc-types
mernst Apr 22, 2026
323f019
Fix formatting
mernst Apr 23, 2026
56874b1
Refactor internal class issue
parameshn Apr 28, 2026
5c9d487
fix formatting
parameshn Apr 28, 2026
6da1f60
Refactor tests to use RowSetProvider factories
parameshn May 26, 2026
cf68d95
Merge ../checker-framework-branch-master into mustcall-jdbc-types
mernst May 29, 2026
0bf48ee
Temporarily disable RowSet tests to isolate CI failure
parameshn Jun 6, 2026
a23679b
Refactor resource leak tests to include error comments
parameshn Jun 12, 2026
ac55dd2
testing
parameshn Jun 18, 2026
8fa7360
Refactor JdbcResourceLeak class to be empty
parameshn Jun 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions checker/tests/resourceleak/JdbcResourceLeak.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Tests for JDBC types resource leak detection
// Test case for issue 6354:
// https://github.com/typetools/checker-framework/issues/6354


class JdbcResourceLeak {}
89 changes: 89 additions & 0 deletions checker/tests/resourceleak/RowSetResourceLeak.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
// Tests for RowSet types resource leak detection
// Test case for issue 6354:
// https://github.com/typetools/checker-framework/issues/6354

import java.sql.SQLException;
import javax.sql.rowset.*;

class RowSetResourceLeak {

// ========== JdbcRowSet Tests ==========

void jdbcRowSetNotClosed() throws SQLException {
JdbcRowSet jrs =
RowSetProvider.newFactory().createJdbcRowSet();

// :: error: [required.method.not.called]
}

void jdbcRowSetClosed() throws SQLException {
JdbcRowSet jrs =
RowSetProvider.newFactory().createJdbcRowSet();

jrs.close();
}

// ========== CachedRowSet Tests ==========

void cachedRowSetNotClosed() throws SQLException {
CachedRowSet crs =
RowSetProvider.newFactory().createCachedRowSet();

// :: error: [required.method.not.called]
}

void cachedRowSetClosed() throws SQLException {
CachedRowSet crs =
RowSetProvider.newFactory().createCachedRowSet();

crs.close();
}

// ========== FilteredRowSet Tests ==========

void filteredRowSetNotClosed() throws SQLException {
FilteredRowSet frs =
RowSetProvider.newFactory().createFilteredRowSet();

// :: error: [required.method.not.called]
}

void filteredRowSetClosed() throws SQLException {
FilteredRowSet frs =
RowSetProvider.newFactory().createFilteredRowSet();

frs.close();
}

// ========== WebRowSet Tests ==========

void webRowSetNotClosed() throws SQLException {
WebRowSet wrs =
RowSetProvider.newFactory().createWebRowSet();

// :: error: [required.method.not.called]
}

void webRowSetClosed() throws SQLException {
WebRowSet wrs =
RowSetProvider.newFactory().createWebRowSet();

wrs.close();
}

// ========== JoinRowSet Tests ==========

void joinRowSetNotClosed() throws SQLException {
JoinRowSet jrs =
RowSetProvider.newFactory().createJoinRowSet();

// :: error: [required.method.not.called]
}

void joinRowSetClosed() throws SQLException {
JoinRowSet jrs =
RowSetProvider.newFactory().createJoinRowSet();

jrs.close();
}
}
Loading