diff --git a/java/ql/test/query-tests/UnreleasedLock/UnreleasedLock.java b/java/ql/test/query-tests/UnreleasedLock/UnreleasedLock.java index eb8de3c496d..2aadb5044be 100644 --- a/java/ql/test/query-tests/UnreleasedLock/UnreleasedLock.java +++ b/java/ql/test/query-tests/UnreleasedLock/UnreleasedLock.java @@ -120,4 +120,16 @@ class Test { } } } + + static class TestPool { + void lock() {} + void unlock() {} + } + + void good11() { + TestPool pool = new TestPool(); + pool.lock(); // Should be excluded because of "Pool" suffix + f(); + pool.unlock(); + } }