zipfs problems

Joel Uckelman uckelman at
Sun Oct 18 10:35:20 PDT 2009


I've been looking at the zipfs demo and have noticed some problems:

* The HashSet ZipFileSystem.closeableObjects could be modified from two
  different threads if each thread calls ZipFilePath.newInputStream() or
  newByteChannel() at about the same time.

* Closeables are only removed from ZipFileSystem.closeableObjects when
  the ZipFileSystem is closed. This means that closed streams and channels
  will stick around long after they could otherwise be gc'd.

* ZipFileSystemProvider.fileSystems has concurrency problems similar to

* Should ZipFileSystemProvider.newFileSystem() really return two distinct
  FileSystem objects when called with two different env Maps?


More information about the nio-dev mailing list