diff --git a/spring-integration-core/src/main/java/org/springframework/integration/config/AnnotationFinder.java b/spring-integration-core/src/main/java/org/springframework/integration/config/AnnotationFinder.java index e3e3a8514f..1caefbdbe1 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/config/AnnotationFinder.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/config/AnnotationFinder.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ import java.util.concurrent.atomic.AtomicReference; import org.springframework.aop.support.AopUtils; import org.springframework.core.annotation.AnnotationUtils; +import org.springframework.util.ClassUtils; import org.springframework.util.ReflectionUtils; import org.springframework.util.ReflectionUtils.MethodCallback; @@ -30,6 +31,7 @@ import org.springframework.util.ReflectionUtils.MethodCallback; * * @author Dave Syer * @author Gunnar Hillert + * @author Soby Chacko * */ abstract class AnnotationFinder { @@ -46,13 +48,12 @@ abstract class AnnotationFinder { return reference.get(); } - @SuppressWarnings("deprecation") private static Class getTargetClass(Object targetObject) { Class targetClass = targetObject.getClass(); if (AopUtils.isAopProxy(targetObject)) { targetClass = AopUtils.getTargetClass(targetObject); } - else if (AopUtils.isCglibProxyClass(targetClass)) { + else if (ClassUtils.isCglibProxyClass(targetClass)) { Class superClass = targetObject.getClass().getSuperclass(); if (!Object.class.equals(superClass)) { targetClass = superClass; diff --git a/spring-integration-core/src/main/java/org/springframework/integration/router/AbstractMessageRouter.java b/spring-integration-core/src/main/java/org/springframework/integration/router/AbstractMessageRouter.java index ba90f0e984..9be804808d 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/router/AbstractMessageRouter.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/router/AbstractMessageRouter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,7 +19,7 @@ package org.springframework.integration.router; import java.util.Collection; import org.springframework.core.convert.ConversionService; -import org.springframework.core.convert.support.ConversionServiceFactory; +import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.integration.Message; import org.springframework.integration.MessageChannel; import org.springframework.integration.MessageDeliveryException; @@ -36,6 +36,7 @@ import org.springframework.jmx.export.annotation.ManagedResource; * @author Mark Fisher * @author Oleg Zhurakousky * @author Gunnar Hillert + * @author Soby Chacko */ @ManagedResource public abstract class AbstractMessageRouter extends AbstractMessageHandler { @@ -100,10 +101,9 @@ public abstract class AbstractMessageRouter extends AbstractMessageHandler { return this.messagingTemplate; } - @SuppressWarnings("deprecation") protected ConversionService getRequiredConversionService() { if (this.getConversionService() == null) { - this.setConversionService(ConversionServiceFactory.createDefaultConversionService()); + this.setConversionService(new DefaultConversionService()); } return this.getConversionService(); } diff --git a/spring-integration-core/src/main/java/org/springframework/integration/util/BeanFactoryTypeConverter.java b/spring-integration-core/src/main/java/org/springframework/integration/util/BeanFactoryTypeConverter.java index ebe5ed8399..69eb44b0f4 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/util/BeanFactoryTypeConverter.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/util/BeanFactoryTypeConverter.java @@ -25,13 +25,14 @@ import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.config.ConfigurableBeanFactory; import org.springframework.core.convert.ConversionService; import org.springframework.core.convert.TypeDescriptor; -import org.springframework.core.convert.support.ConversionServiceFactory; +import org.springframework.core.convert.support.DefaultConversionService; import org.springframework.expression.TypeConverter; /** * @author Dave Syer * @author Oleg Zhurakousky * @author Gary Russell + * @author Soby Chacko */ public class BeanFactoryTypeConverter implements TypeConverter, BeanFactoryAware { @@ -43,11 +44,10 @@ public class BeanFactoryTypeConverter implements TypeConverter, BeanFactoryAware private volatile ConversionService conversionService; - @SuppressWarnings("deprecation") public BeanFactoryTypeConverter() { synchronized (BeanFactoryTypeConverter.class) { if (defaultConversionService == null) { - defaultConversionService = ConversionServiceFactory.createDefaultConversionService(); + defaultConversionService = new DefaultConversionService(); } } this.conversionService = defaultConversionService; diff --git a/spring-integration-core/src/main/java/org/springframework/integration/util/MessagingMethodInvokerHelper.java b/spring-integration-core/src/main/java/org/springframework/integration/util/MessagingMethodInvokerHelper.java index 22ea6ca674..af98e99626 100644 --- a/spring-integration-core/src/main/java/org/springframework/integration/util/MessagingMethodInvokerHelper.java +++ b/spring-integration-core/src/main/java/org/springframework/integration/util/MessagingMethodInvokerHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,6 +73,7 @@ import org.springframework.util.StringUtils; * @author Oleg Zhurakousky * @author Dave Syer * @author Gunnar Hillert + * @author Soby Chacko * * @since 2.0 */ @@ -356,13 +357,12 @@ public class MessagingMethodInvokerHelper extends AbstractExpressionEvaluator return fallbackMethods; } - @SuppressWarnings("deprecation") private Class getTargetClass(Object targetObject) { Class targetClass = targetObject.getClass(); if (AopUtils.isAopProxy(targetObject)) { targetClass = AopUtils.getTargetClass(targetObject); } - else if (AopUtils.isCglibProxyClass(targetClass)) { + else if (org.springframework.util.ClassUtils.isCglibProxyClass(targetClass)) { Class superClass = targetObject.getClass().getSuperclass(); if (!Object.class.equals(superClass)) { targetClass = superClass;