1.0-rc2
Pre-release
Pre-release
Second release candidate, containing a number of fixes and usability improvements.
This release can be used with Maven as:
<dependency>
<groupId>com.google.jimfs</groupId>
<artifactId>jimfs</artifactId>
<version>1.0-rc2</version>
</dependency>
Notable changes:
FileSystem
instances are now cached statically, so even if multiple instances ofJimfsFileSystemProvider
are created, they'll share the same cache of file systems. This is meant to ensure that whatClassLoader
happens to loadJimfsFileSystemProvider
has no effect on behavior (the provider instance itself is only cached if it can be loaded by the systemClassLoader
).FileSystem
instances are now cached with weak references, allowing them to be garbage collected when no references remain even ifclose()
has not been called. This is preferable in most cases. The only negative impact is that if you wish to hold on to aURI
(either for aFileSystem
or aPath
in that file system) and later use it to retrieve thatFileSystem
/Path
, it may not work unless you ensure that a strong reference to theFileSystem
is held somewhere.- Closing a
FileSystem
now closes all open streams, channels, etc. for that file system and causes mostFiles
methods to throwClosedFileSystemException
. - The jar now has OSGi metadata.