Example usage for org.eclipse.jgit.internal.storage.file WindowCache reconfigure

List of usage examples for org.eclipse.jgit.internal.storage.file WindowCache reconfigure

Introduction

In this page you can find the example usage for org.eclipse.jgit.internal.storage.file WindowCache reconfigure.

Prototype

@Deprecated
public static void reconfigure(WindowCacheConfig cfg) 

Source Link

Document

Modify the configuration of the window cache.

Usage

From source file:org.uberfire.java.nio.fs.jgit.util.commands.SubdirectoryClone.java

License:Apache License

private void cleanupDir(final File gitDir) {

    try {//  w ww .j av  a 2 s.com
        if (System.getProperty("os.name").toLowerCase().contains("windows")) {
            //this operation forces a cache clean freeing any lock -> windows only issue!
            WindowCache.reconfigure(new WindowCacheConfig());
        }
        FileUtils.delete(gitDir, FileUtils.RECURSIVE | FileUtils.RETRY);
    } catch (java.io.IOException e) {
        throw new org.uberfire.java.nio.IOException("Failed to remove the git repository.", e);
    }
}