@SuppressWarnings({ "unchecked" }) @Override public void ungetHandler(Module module, String childModulePrefix, ModuleHandler handler) { ModuleHandler handlerOfModule = getHandlers().get(childModulePrefix + module.getId()); if (handlerOfModule instanceof AbstractCompositeModuleHandler) { AbstractCompositeModuleHandler<ModuleImpl, ?, ?> h = (AbstractCompositeModuleHandler<ModuleImpl, ?, ?>) handlerOfModule; Set<ModuleImpl> modules = h.moduleHandlerMap.keySet(); if (modules != null) { for (ModuleImpl child : modules) { ModuleHandler childHandler = h.moduleHandlerMap.get(child); ModuleHandlerFactory mhf = ruleEngine.getModuleHandlerFactory(child.getTypeUID()); mhf.ungetHandler(child, childModulePrefix + ":" + module.getId(), childHandler); } } } String ruleId = getRuleId(childModulePrefix); super.ungetHandler(module, ruleId, handler); }