Make CollectAllTests tolerate runtime SecurityException
git cherry-pick -e 98194f2e1274035c224d34c3dfa5f925293d2520
diff --git a/tools/utils/CollectAllTests.java b/tools/utils/CollectAllTests.java
index c6c536d..69c77eb 100644
--- a/tools/utils/CollectAllTests.java
+++ b/tools/utils/CollectAllTests.java
@@ -208,12 +208,18 @@
addToTests(expectations, testCases, klass.asSubclass(TestCase.class));
continue;
} catch (NoSuchMethodException e) {
+ } catch (SecurityException e) {
+ System.out.println("problem with class " + className);
+ e.printStackTrace();
}
try {
klass.getConstructor(new Class<?>[0]);
addToTests(expectations, testCases, klass.asSubclass(TestCase.class));
continue;
} catch (NoSuchMethodException e) {
+ } catch (SecurityException e) {
+ System.out.println("problem with class " + className);
+ e.printStackTrace();
}
} catch (ClassNotFoundException e) {
System.out.println("class not found " + className);