Source:
<code>protected final BeanMetadataElement parseSource(Element element, ParserContext parserContext) { BeanDefinitionBuilder synchronizerBuilder = BeanDefinitionBuilder.genericBeanDefinition( this.getInboundFileSynchronizerClassname()); synchronizerBuilder.addConstructorArgReference(element.getAttribute("session-factory")); BeanDefinition expressionDef = IntegrationNamespaceUtils.createExpressionDefinitionFromValueOrExpression( "remote-directory", "remote-directory-expression", parserContext, element, false); if (expressionDef != null) { synchronizerBuilder.addPropertyValue("remoteDirectoryExpression", expressionDef); } IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "delete-remote-files"); IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "preserve-timestamp"); String remoteFileSeparator = element.getAttribute("remote-file-separator"); synchronizerBuilder.addPropertyValue("remoteFileSeparator", remoteFileSeparator); IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "temporary-file-suffix"); FileParserUtils.configureFilter(synchronizerBuilder, element, parserContext, <START> getSimplePatternFileListFilterClassname(), getRegexPatternFileListFilterClassname()); <END> BeanDefinitionBuilder messageSourceBuilder = BeanDefinitionBuilder.genericBeanDefinition(getMessageSourceClassname()); messageSourceBuilder.addConstructorArgValue(synchronizerBuilder.getBeanDefinition()); String comparator = element.getAttribute("comparator"); if (StringUtils.hasText(comparator)) { messageSourceBuilder.addConstructorArgReference(comparator); } IntegrationNamespaceUtils.setReferenceIfAttributeDefined(messageSourceBuilder, element, "local-filter"); IntegrationNamespaceUtils.setValueIfAttributeDefined(messageSourceBuilder, element, "local-directory"); IntegrationNamespaceUtils.setValueIfAttributeDefined(messageSourceBuilder, element, "auto-create-local-directory"); String localFileGeneratorExpression = element.getAttribute("local-filename-generator-expression"); if (StringUtils.hasText(localFileGeneratorExpression)) { BeanDefinitionBuilder localFileGeneratorExpressionBuilder = BeanDefinitionBuilder.genericBeanDefinition(ExpressionFactoryBean.class); localFileGeneratorExpressionBuilder.addConstructorArgValue(localFileGeneratorExpression); synchronizerBuilder.addPropertyValue("localFilenameGeneratorExpression", localFileGeneratorExpressionBuilder.getBeanDefinition()); } return messageSourceBuilder.getBeanDefinition(); }</code><technical_language>If refactoring this already, switch Class<?>. hands itch fix ...Classname() camel-case typo, I this code :smile:</technical_language>

Target:
protected final BeanMetadataElement parseSource(Element element, ParserContext parserContext) { BeanDefinitionBuilder synchronizerBuilder = BeanDefinitionBuilder.genericBeanDefinition( this.getInboundFileSynchronizerClass()); synchronizerBuilder.addConstructorArgReference(element.getAttribute("session-factory")); BeanDefinition expressionDef = IntegrationNamespaceUtils.createExpressionDefinitionFromValueOrExpression( "remote-directory", "remote-directory-expression", parserContext, element, false); if (expressionDef != null) { synchronizerBuilder.addPropertyValue("remoteDirectoryExpression", expressionDef); } IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "delete-remote-files"); IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "preserve-timestamp"); String remoteFileSeparator = element.getAttribute("remote-file-separator"); synchronizerBuilder.addPropertyValue("remoteFileSeparator", remoteFileSeparator); IntegrationNamespaceUtils.setValueIfAttributeDefined(synchronizerBuilder, element, "temporary-file-suffix"); FileParserUtils.configureFilter(synchronizerBuilder, element, parserContext, getSimplePatternFileListFilterClass(), getRegexPatternFileListFilterClass()); BeanDefinitionBuilder messageSourceBuilder = BeanDefinitionBuilder.genericBeanDefinition(getMessageSourceClassname()); messageSourceBuilder.addConstructorArgValue(synchronizerBuilder.getBeanDefinition()); String comparator = element.getAttribute("comparator"); if (StringUtils.hasText(comparator)) { messageSourceBuilder.addConstructorArgReference(comparator); } IntegrationNamespaceUtils.setReferenceIfAttributeDefined(messageSourceBuilder, element, "local-filter"); IntegrationNamespaceUtils.setValueIfAttributeDefined(messageSourceBuilder, element, "local-directory"); IntegrationNamespaceUtils.setValueIfAttributeDefined(messageSourceBuilder, element, "auto-create-local-directory"); String localFileGeneratorExpression = element.getAttribute("local-filename-generator-expression"); if (StringUtils.hasText(localFileGeneratorExpression)) { BeanDefinitionBuilder localFileGeneratorExpressionBuilder = BeanDefinitionBuilder.genericBeanDefinition(ExpressionFactoryBean.class); localFileGeneratorExpressionBuilder.addConstructorArgValue(localFileGeneratorExpression); synchronizerBuilder.addPropertyValue("localFilenameGeneratorExpression", localFileGeneratorExpressionBuilder.getBeanDefinition()); } return messageSourceBuilder.getBeanDefinition(); }