#vulnerable code 
                                @Test
    public void testUpdateTimestampAsInstant() {
        Database db = db();
        db.update("update person set registered=? where name='FRED'") //
                .parameter(Instant.ofEpochMilli(FRED_REGISTERED_TIME)) //
                .counts() //
                .test().awaitDone(TIMEOUT_SECONDS, TimeUnit.SECONDS) //
                .assertValue(1) //
                .assertComplete();
        db.select("select registered from person where name='FRED'") //
                .getAs(Long.class) //
                .test().awaitDone(TIMEOUT_SECONDS, TimeUnit.SECONDS) //
                .assertValue(FRED_REGISTERED_TIME) //
                .assertComplete();
    } 
                            #location 11 
                            #vulnerability type RESOURCE_LEAK
#fixed code
                                @Test
    public void testUpdateTimestampAsInstant() {
        try (Database db = db()) {
            db.update("update person set registered=? where name='FRED'") //
                    .parameter(Instant.ofEpochMilli(FRED_REGISTERED_TIME)) //
                    .counts() //
                    .test().awaitDone(TIMEOUT_SECONDS, TimeUnit.SECONDS) //
                    .assertValue(1) //
                    .assertComplete();
            db.select("select registered from person where name='FRED'") //
                    .getAs(Long.class) //
                    .test().awaitDone(TIMEOUT_SECONDS, TimeUnit.SECONDS) //
                    .assertValue(FRED_REGISTERED_TIME) //
                    .assertComplete();
        }
    }