Source:
private void handleCompositeModuleDeployment(CompositeModuleDeploymentRequest request, Message<?> message) { List<ModuleDeploymentRequest> children = request.getChildren(); Assert.notEmpty(children, "child module list must not be empty"); List<ModuleDefinition> definitions = new ArrayList<ModuleDefinition>(); List<Map<String, String>> paramList = new ArrayList<Map<String, String>>(); for (ModuleDeploymentRequest child : children) { String name = child.getModule(); ModuleType type = child.getType(); ModuleDefinition definition = this.moduleDefinitionRepository.findByNameAndType(name, type); Assert.notNull(definition, "No moduleDefinition for " + type + ":" + name); definitions.add(definition); Map<String, String> params = child.getParameters(); if (CollectionUtils.isEmpty(params)) { params = Collections.emptyMap(); } paramList.add(params); } String group = request.getGroup(); int index = request.getIndex(); String sourceChannelName = request.getSourceChannelName(); String sinkChannelName = request.getSinkChannelName(); DeploymentMetadata metadata = new DeploymentMetadata(group, index, sourceChannelName, sinkChannelName); List<SimpleModule> modules = new ArrayList<SimpleModule>(definitions.size()); if (parentClassLoader == null) { parentClassLoader = ClassUtils.getDefaultClassLoader(); } for (int i = 0; i < definitions.size(); i++) { ModuleDefinition definition = definitions.get(i); DeploymentMetadata submoduleMetadata = new DeploymentMetadata(metadata.getGroup() + "." + request.getModule(), i); ClassLoader classLoader = (definition.getClasspath() == null) ? null : new ParentLastURLClassLoader(definition.getClasspath(), parentClassLoader); SimpleModule module = new SimpleModule(definition, submoduleMetadata, classLoader); if (paramList != null && paramList.size() > i) { Properties props = new Properties(); props.putAll(paramList.get(i)); module.addProperties(props); if (logger.isDebugEnabled()) { logger.debug("added properties for child module [" + module.getName() + "]: " + props); } } modules.add(module); } CompositeModule module = new CompositeModule(request.getModule(), request.getType(), modules, metadata); deployModule(module, request, message); }

Target:
private void handleCompositeModuleDeployment(CompositeModuleDeploymentRequest request, Message<?> message) { List<ModuleDeploymentRequest> children = request.getChildren(); Assert.notEmpty(children, "child module list must not be empty"); List<ModuleDefinition> definitions = new ArrayList<ModuleDefinition>(); List<Map<String, String>> paramList = new ArrayList<Map<String, String>>(); for (ModuleDeploymentRequest child : children) { String name = child.getModule(); ModuleType type = child.getType(); ModuleDefinition definition = this.moduleDefinitionRepository.findByNameAndType(name, type); Assert.notNull(definition, "No moduleDefinition for " + type + ":" + name); definitions.add(definition); Map<String, String> params = child.getParameters(); if (CollectionUtils.isEmpty(params)) { params = Collections.emptyMap(); } paramList.add(params); } String group = request.getGroup(); int index = request.getIndex(); String sourceChannelName = request.getSourceChannelName(); String sinkChannelName = request.getSinkChannelName(); DeploymentMetadata metadata = new DeploymentMetadata(group, index, sourceChannelName, sinkChannelName); List<SimpleModule> modules = new ArrayList<SimpleModule>(definitions.size()); if (parentClassLoader == null) { parentClassLoader = ClassUtils.getDefaultClassLoader(); } for (int i = 0; i < definitions.size(); i++) { ModuleDefinition definition = definitions.get(i); DeploymentMetadata submoduleMetadata = new DeploymentMetadata(metadata.getGroup() + "." + request.getModule(), i); ClassLoader classLoader = (definition.getClasspath() == null) ? null : new ParentLastURLClassLoader(definition.getClasspath(), parentClassLoader); SimpleModule module = new SimpleModule(definition, submoduleMetadata, classLoader); Properties props = new Properties(); props.putAll(paramList.get(i)); module.addProperties(props); if (logger.isDebugEnabled()) { logger.debug("added properties for child module [" + module.getName() + "]: " + props); } modules.add(module); } CompositeModule module = new CompositeModule(request.getModule(), request.getType(), modules, metadata); deployModule(module, request, message); }