FIxing a mistake in the Gemfire AdapterParsers where the element attribute validation is not correctly applied and will never result in the intended behavior.

This commit is contained in:
Dan Oxlade
2011-11-16 21:18:05 +00:00
committed by Mark Fisher
parent 740246a419
commit 8d9192b9fb
7 changed files with 166 additions and 4 deletions

View File

@@ -59,11 +59,11 @@ public class GemfireCqInboundChannelAdapterParser extends AbstractChannelAdapter
IntegrationNamespaceUtils.setValueIfAttributeDefined(continuousQueryMesageProducer, element, EXPRESSION_ATTRIBUTE,PAYLOAD_EXPRESSION_PROPERTY);
IntegrationNamespaceUtils.setValueIfAttributeDefined(continuousQueryMesageProducer, element, QUERY_EVENTS_ATTRIBUTE, SUPPORTED_EVENT_TYPES_PROPERTY);
if (!StringUtils.hasText(QUERY_LISTENER_CONTAINER_ATTRIBUTE)){
if (!element.hasAttribute(QUERY_LISTENER_CONTAINER_ATTRIBUTE)){
parserContext.getReaderContext().error("'query-listener-container' attribute is required.",element);
}
if (!StringUtils.hasText(QUERY_ATTRIBUTE)){
if (!element.hasAttribute(QUERY_ATTRIBUTE)){
parserContext.getReaderContext().error("'query' attribute is required.",element);
}

View File

@@ -53,7 +53,7 @@ public class GemfireInboundChannelAdapterParser extends AbstractChannelAdapterPa
IntegrationNamespaceUtils.setValueIfAttributeDefined(listeningMessageProducer, element, EXPRESSION_ATTRIBUTE,PAYLOAD_EXPRESSION_PROPERTY);
IntegrationNamespaceUtils.setValueIfAttributeDefined(listeningMessageProducer, element, CACHE_EVENTS_ATTRIBUTE, SUPPORTED_EVENT_TYPES_PROPERTY);
if (!StringUtils.hasText(REGION_ATTRIBUTE)){
if (!element.hasAttribute(REGION_ATTRIBUTE)){
parserContext.getReaderContext().error("'region' attribute is required.",element);
}

View File

@@ -44,7 +44,7 @@ public class GemfireOutboundChannelAdapterParser extends AbstractOutboundChannel
protected AbstractBeanDefinition parseConsumer(Element element, ParserContext parserContext) {
BeanDefinitionBuilder cacheWritingMessageHandler = BeanDefinitionBuilder.genericBeanDefinition(
GEMFIRE_OUTBOUND_CACHE_WRITING_MESSAGE_HANDLER);
if (!StringUtils.hasText(REGION_ATTRIBUTE)){
if (!element.hasAttribute(REGION_ATTRIBUTE)){
parserContext.getReaderContext().error("'region' attribute is required.",element);
}