mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-03 00:23:24 +00:00
No effective change - modify one of the QueryIterator tests to use try with resources
This commit is contained in:
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());
|
||||
|
||||
Reference in new issue
Block a user