--- a/test/langtools/tools/javac/lib/combo/ComboInstance.java Mon Oct 21 15:11:44 2019 +0200
+++ b/test/langtools/tools/javac/lib/combo/ComboInstance.java Mon Oct 21 15:38:26 2019 +0200
@@ -23,6 +23,7 @@
package combo;
+import java.lang.reflect.Method;
import javax.tools.StandardJavaFileManager;
import java.util.Optional;
@@ -57,6 +58,14 @@
env.info().lastError = Optional.of(ex);
} finally {
this.env = null;
+ try {
+ Class<?> fmClass = env.fileManager().getClass();
+ Method clear = fmClass.getMethod("clear");
+ clear.setAccessible(true);
+ clear.invoke(env.fileManager());
+ } catch (Exception ex) {
+ throw new IllegalStateException(ex);
+ }
}
}
@@ -125,4 +134,4 @@
return success;
}
}
-}
\ No newline at end of file
+}