Skip to content

Commit 516b84b

Browse files
committed
Add test for *Pool exclusion
1 parent 4f1ad0f commit 516b84b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

java/ql/test/query-tests/UnreleasedLock/UnreleasedLock.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,16 @@ void bad10() {
120120
}
121121
}
122122
}
123+
124+
static class TestPool {
125+
void lock() {}
126+
void unlock() {}
127+
}
128+
129+
void good11() {
130+
TestPool pool = new TestPool();
131+
pool.lock(); // Should be excluded because of "Pool" suffix
132+
f();
133+
pool.unlock();
134+
}
123135
}

0 commit comments

Comments
 (0)