mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
in case of cleanup failure do not try to clean again
This commit is contained in:
@@ -245,14 +245,20 @@ class ServerState {
|
||||
return compileScope;
|
||||
}
|
||||
|
||||
|
||||
private static boolean ourCleanupFailed = false;
|
||||
|
||||
private static void clearZipIndexCache() {
|
||||
try {
|
||||
final Class<?> indexClass = Class.forName("com.sun.tools.javac.zip.ZipFileIndex");
|
||||
final Method clearMethod = indexClass.getMethod("clearCache");
|
||||
clearMethod.invoke(null);
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
LOG.info(ex);
|
||||
if (!ourCleanupFailed) {
|
||||
try {
|
||||
final Class<?> indexClass = Class.forName("com.sun.tools.javac.zip.ZipFileIndex");
|
||||
final Method clearMethod = indexClass.getMethod("clearCache");
|
||||
clearMethod.invoke(null);
|
||||
}
|
||||
catch (Throwable ex) {
|
||||
ourCleanupFailed = true;
|
||||
LOG.info(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user