HCOLL-167 when running the profile I found that we were not closing every connection, so no being super fussy about adding everything to closable.

This commit is contained in:
Rob Austin
2014-10-20 13:02:42 +01:00
parent 0043b16d5e
commit 023d12a6d0
6 changed files with 170 additions and 94 deletions
@@ -21,15 +21,15 @@ import org.slf4j.LoggerFactory;
import java.io.Closeable;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
final class CloseablesManager implements Closeable {
private static final Logger LOG = LoggerFactory.getLogger(CloseablesManager.class.getName());
private boolean isClosed = false;
private final List<Closeable> closeables = new ArrayList<Closeable>();
private final Set<Closeable> closeables = new HashSet<Closeable>();
private void checkState() {
if (isClosed)