@Test public void testCheckOpen() throws IOException { state.checkOpen(); state.close(); try { state.checkOpen(); fail(); } catch (ClosedFileSystemException expected) { } }
public void checkOpen() { if (!open.get()) { throw new ClosedFileSystemException(); } }
FileSystemState implements Closeable { public void checkOpen() { if (!open.get()) { throw new ClosedFileSystemException(); } } }
FileSystemState implements Closeable { public void checkOpen() { if (!open.get()) { throw new ClosedFileSystemException(); } } FileSystemState(Runnable onClose); }
FileSystemState implements Closeable { public void checkOpen() { if (!open.get()) { throw new ClosedFileSystemException(); } } FileSystemState(Runnable onClose); boolean isOpen(); void checkOpen(); C register(C resource); void unregister(Closeable resource); @Override void close(); }
FileSystemState implements Closeable { public void checkOpen() { if (!open.get()) { throw new ClosedFileSystemException(); } } FileSystemState(Runnable onClose); boolean isOpen(); void checkOpen(); C register(C resource); void unregister(Closeable resource); @Override void close();  }