From 433b76618b446f5c09a38fc894d594c486b84b8e Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Thu, 11 Mar 2010 22:48:27 +0000 Subject: [PATCH] no longer falling back to "conversionService" after checking for "integrationConversionService" --- .../context/IntegrationContextUtils.java | 14 +------------- .../context/IntegrationObjectSupport.java | 3 +-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/context/IntegrationContextUtils.java b/org.springframework.integration/src/main/java/org/springframework/integration/context/IntegrationContextUtils.java index 677b76f048..587c3f14a4 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/context/IntegrationContextUtils.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/context/IntegrationContextUtils.java @@ -17,8 +17,6 @@ package org.springframework.integration.context; import org.springframework.beans.factory.BeanFactory; -import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; -import org.springframework.context.ConfigurableApplicationContext; import org.springframework.core.convert.ConversionService; import org.springframework.integration.core.MessageChannel; import org.springframework.integration.scheduling.PollerMetadata; @@ -62,17 +60,7 @@ public abstract class IntegrationContextUtils { } public static ConversionService getConversionService(BeanFactory beanFactory) { - ConversionService conversionService = getBeanOfType(beanFactory, - INTEGRATION_CONVERSION_SERVICE_BEAN_NAME, ConversionService.class); - if (conversionService == null && beanFactory instanceof ConfigurableListableBeanFactory) { - conversionService = ((ConfigurableListableBeanFactory) beanFactory).getConversionService(); - } - if (conversionService == null && beanFactory.containsBean( - ConfigurableApplicationContext.CONVERSION_SERVICE_BEAN_NAME)) { - conversionService = getBeanOfType(beanFactory, - ConfigurableApplicationContext.CONVERSION_SERVICE_BEAN_NAME, ConversionService.class); - } - return conversionService; + return getBeanOfType(beanFactory, INTEGRATION_CONVERSION_SERVICE_BEAN_NAME, ConversionService.class); } private static T getBeanOfType(BeanFactory beanFactory, String beanName, Class type) { diff --git a/org.springframework.integration/src/main/java/org/springframework/integration/context/IntegrationObjectSupport.java b/org.springframework.integration/src/main/java/org/springframework/integration/context/IntegrationObjectSupport.java index 6436495f2f..541a0a52bc 100644 --- a/org.springframework.integration/src/main/java/org/springframework/integration/context/IntegrationObjectSupport.java +++ b/org.springframework.integration/src/main/java/org/springframework/integration/context/IntegrationObjectSupport.java @@ -132,8 +132,7 @@ public abstract class IntegrationObjectSupport implements ComponentMetadataProvi if (this.conversionService == null && logger.isWarnEnabled()) { logger.warn("Unable to attempt conversion of Message payload types. Component '" + this.getBeanName() + "' has no explicit ConversionService reference, " + - "and there is no 'integrationConversionService' or 'conversionService' " + - "bean within the context."); + "and there is no 'integrationConversionService' bean within the context."); } } return this.conversionService;