resources/src/main/java/org/robolectric/res/Fs.java
private static FileSystem getJarFs(Path jarFile) throws IOException {
    Path key = jarFile.toAbsolutePath();

    synchronized (ZIP_FILESYSTEMS) {
      FsWrapper fs = ZIP_FILESYSTEMS.get(key);
      if (fs == null) {
        fs = new FsWrapper(FileSystems.newFileSystem(key, null), key);
        fs.incrRefCount();

        ZIP_FILESYSTEMS.put(key, fs);
      } else {
        fs.incrRefCount();
      }

      return fs;
    }
  }
private static FileSystem getJarFs(Path jarFile) throws IOException {
    Path key = jarFile.toAbsolutePath();

    synchronized (ZIP_FILESYSTEMS) {
      FsWrapper fs = ZIP_FILESYSTEMS.get(key);
      if (fs == null) {
        fs = new FsWrapper(FileSystems.newFileSystem(key, null), key);
        fs.incrRefCount();

        ZIP_FILESYSTEMS.put(key, fs);
      } else {
        fs.incrRefCount();
      }

      return fs;
    }
  }
private static FileSystem getJarFs ( Path jarFile ) throws IOException { Path key = jarFile . toAbsolutePath ( ) ; synchronized ( ZIP_FILESYSTEMS ) { FsWrapper fs = ZIP_FILESYSTEMS . get ( key ) ; if ( fs == null ) { fs = new FsWrapper ( FileSystems . newFileSystem ( key , null ) , key ) ; fs . incrRefCount ( ) ; ZIP_FILESYSTEMS . put ( key , fs ) ; } else { fs . incrRefCount ( ) ; } return fs ; } }
Returns a reference-counted Jar FileSystem, possibly one that was previously returned.
Returns a reference - counted Jar FileSystem possibly one that was previously returned .