protected final void checkOpen() {
    if (!open.get()) {
      throw new ClosedWatchServiceException();
    }
  }
Checks that the watch service is open, throwing {@link ClosedWatchServiceException} if not.
jimfs/src/main/java/com/google/common/jimfs/AbstractWatchService.java