#vulnerable code 
                                @Test
    public void testSelectWithFetchSize() {
        db().select("select score from person order by name") //
                .fetchSize(2) //
                .getAs(Integer.class) //
                .test() //
                .awaitDone(TIMEOUT_SECONDS, TimeUnit.SECONDS) //
                .assertNoErrors() //
                .assertValues(21, 34, 25) //
                .assertComplete();
    } 
                            #location 5 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testSelectWithFetchSize() {
        try (Database db = db()) {
            db.select("select score from person order by name") //
                    .fetchSize(2) //
                    .getAs(Integer.class) //
                    .test() //
                    .awaitDone(TIMEOUT_SECONDS, TimeUnit.SECONDS) //
                    .assertNoErrors() //
                    .assertValues(21, 34, 25) //
                    .assertComplete();
        }
    }