classloaders.clear(); // don't need this shallow copy anymore, help the GC clean up
} finally {
Thread.currentThread().setContextClassLoader(originalCL);
}
OperationResult info = new OperationResult();
PropertySimple numClassLoaders = new PropertySimple("numberOfClassLoaders", String.valueOf(classloaderCounts
.size()));
PropertyList list = new PropertyList("classloaders");
info.getComplexResults().put(numClassLoaders);
info.getComplexResults().put(list);
for (Map.Entry<ClassLoader, AtomicInteger> entry : classloaderCounts.entrySet()) {
ClassLoader classloader = entry.getKey();
AtomicInteger count = entry.getValue();
PropertyMap map = new PropertyMap("classloader");