Using the ParserContext's delegate instead of manually resolving the parser for custom elements.
This commit is contained in:
@@ -152,10 +152,8 @@ public abstract class IntegrationNamespaceUtils {
|
||||
pollerMetadataRef = pollerElement.getAttribute("ref");
|
||||
}
|
||||
else {
|
||||
ParserContext childContext = new ParserContext(
|
||||
parserContext.getReaderContext(), parserContext.getDelegate(), targetBuilder.getBeanDefinition());
|
||||
BeanDefinition beanDefinition = parserContext.getReaderContext().getNamespaceHandlerResolver().resolve(
|
||||
pollerElement.getNamespaceURI()).parse(pollerElement, childContext);
|
||||
BeanDefinition beanDefinition = parserContext.getDelegate().parseCustomElement(
|
||||
pollerElement, targetBuilder.getBeanDefinition());
|
||||
Assert.notNull(beanDefinition, "BeanDefinition must not be null");
|
||||
Assert.isInstanceOf(AbstractBeanDefinition.class, beanDefinition);
|
||||
pollerMetadataRef = BeanDefinitionReaderUtils.registerWithGeneratedName(
|
||||
|
||||
Reference in New Issue
Block a user