- Fixed an issue in the shutdown hook that could cause a
NoClassDefFoundError
during JVM shutdown ifScanResult#close()
was not called by the user before shutdown, and the classloader's shutdown hook was called before ClassGraph's shutdown hook, which prevented further classloading (#331, thanks to @gitmotte for the report, and for providing a full testcase project). - Added support for the Plexus ClassWorlds
ClassRealm
classloader. - Made it possible to specifically scan
rt.jar
by callingnew ClassGraph().overrideClasspath(rtJarPath)
(thanks to @jechlin for requesting). - In
ClassGraphClassLoader
, callfindLoadedClass()
at beginning offindClass()
, so that cached classes are returned more quickly. - Refactored and cleaned up
ClassLoaderHandler
code, and code that finds the classloader delegation order.