logSummary(child, references, indent, showErrors);
}
}
private void cleanup() {
ClassWorld world = container.getClassWorld();
log.debug("Removing all realms from: {}", world);
//noinspection unchecked
for (ClassRealm realm : (List<ClassRealm>)world.getRealms()) {
String id = realm.getId();
try {
log.debug("Disposing class realm: {}", id);
world.disposeRealm(id);
}
catch (Exception e) {
log.warn("Failed to dispose class realm: {}", id, e);
}
}
//noinspection unchecked
purgeStrayShutdownHooks(world.getRealms());
container.dispose();
}