No effective change - modify one of the QueryIterator tests to use try with resources

This commit is contained in:
Rob Bygrave committed 2016-11-23 23:40:57 +13:00
1 parent cdb319f0ef
commit 4af350bd14
1 file changed
+1 -4
@@ -34,15 +34,12 @@ public class TestQueryFindIterate extends BaseTestCase {
final AtomicInteger count = new AtomicInteger();
QueryIterator<Customer> it = query.findIterate();
try {
try (QueryIterator<Customer> it = query.findIterate()) {
while (it.hasNext()) {
Customer customer = it.next();
customer.getName();
count.incrementAndGet();
}
} finally {
it.close();
}
assertEquals(2, count.get());