8222448: java/lang/reflect/PublicMethods/PublicMethodsTest.java times out

Set empty class path for compilation to avoid unnecessary opening/scanning of JAR files

Reviewed-by: alanb, dholmes
This commit is contained in:
Mandy Chung 2019-06-04 12:50:15 -07:00
parent 7356905a83
commit a9e23e8305

View File

@ -222,6 +222,11 @@ public class PublicMethodsTest {
StandardJavaFileManager standardJavaFileManager =
javac.getStandardFileManager(errorsCollector, Locale.ROOT,
Charset.forName("UTF-8"));
try {
standardJavaFileManager.setLocation(StandardLocation.CLASS_PATH, List.of());
} catch (IOException e) {
throw new UncheckedIOException(e);
}
TestFileManager testFileManager = new TestFileManager(
standardJavaFileManager, source);