[JENKINS-64423, JENKINS-46618] Resolve all core caused startup Illegal reflective access warnings (#5110)

Co-authored-by: Jesse Glick <jglick@cloudbees.com>
This commit is contained in:
Tim JacombandJesse Glick authored and GitHub committed 2021-01-06 08:04:40 +00:00
1 parent 03c8d8628e
commit ae88291731
6 files changed
+158 -78

No files matched your search

@@ -486,12 +486,6 @@ public abstract class ExtensionFinder implements ExtensionPoint {
return;
}
try {
ClassLoader ecl = c.getClassLoader();
if (ecl != null) { // Not bootstrap classloader
Method m = ClassLoader.class.getDeclaredMethod("resolveClass", Class.class);
m.setAccessible(true);
m.invoke(ecl, c);
}
for (Class<?> cc = c; cc != Object.class && cc != null; cc = cc.getSuperclass()) {
/*
* See {@link com.google.inject.spi.InjectionPoint#getInjectionPoints(TypeLiteral, boolean, Errors)}