HCOLL-133 CloseablesManager.checkState is throwing java.lang.IllegalStateException

This commit is contained in:
Rob Austin
2014-09-23 19:17:04 +01:00
parent 511f195a9f
commit abc56b855a
3 changed files with 45 additions and 4 deletions
@@ -29,7 +29,7 @@ final class CloseablesManager implements Closeable {
private static final Logger LOG = LoggerFactory.getLogger(CloseablesManager.class.getName());
private boolean isClosed = false;
private List<Closeable> closeables = new ArrayList<Closeable>();
private final List<Closeable> closeables = new ArrayList<>();
private void checkState() {
if (isClosed)
@@ -84,4 +84,8 @@ final class CloseablesManager implements Closeable {
// do nothing
}
}
boolean isClosed() {
return isClosed;
}
}