[JENKINS-60449] Attempt to fix an odd case of OptionalExtension blowing up Jenkins (#4393)
* Add new module optional-depender and a new failing test * Variant plugin is a dependency of optional-depender Optional-depender contains the following class @OptionalExtension(requirePlugins = {"dependee"}) public class OptionalDependerExtension { private static void foo(Dependee d) { } } * [JENKINS-60449] Move plugin initialization at the end, keep only one extension refresh * Improve logic to detect classloading issues Inspect all declared constructors/methods/fields recursively to exclude failing classes from Guice rather than have Guice explode. This also fix the failing test, but the previous commit is still better because it avoids an extra Jenkins.get().refreshExtensions() call. * Only test resolveClass method if the classloader is not the bootstrap one
Please register or sign in to comment