- 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);
+ }