private static Optional<Bundle> isClassloaderForUninstalledBundle(ClassLoader cl) {
        if (cl instanceof BundleWiringImpl.BundleClassLoader bcl) {
            Bundle b = bcl.getBundle();
            if (b.getState() == Bundle.UNINSTALLED) return Optional.of(b);
        }
        return Optional.empty();
    }
Detect and warn on threads leaked by defunct application components.
These are threads launched by components of application bundles and not stopped after subsequent component deconstruction.
The below algorithm is a heuristic and will not detect all leaked threads.
jdisc_core/src/main/java/com/yahoo/jdisc/core/ContainerWatchdog.java