diff --git a/spring-eai-core/src/main/java/org/springframework/integration/config/PublisherAnnotationPostProcessor.java b/spring-eai-core/src/main/java/org/springframework/integration/config/PublisherAnnotationPostProcessor.java index 9dfd7d7940..5a1aded5b8 100644 --- a/spring-eai-core/src/main/java/org/springframework/integration/config/PublisherAnnotationPostProcessor.java +++ b/spring-eai-core/src/main/java/org/springframework/integration/config/PublisherAnnotationPostProcessor.java @@ -50,6 +50,7 @@ public class PublisherAnnotationPostProcessor implements BeanPostProcessor, Bean public void setBeanClassLoader(ClassLoader beanClassLoader) { + Assert.notNull(beanClassLoader, "beanClassLoader must not be null"); this.beanClassLoader = beanClassLoader; } diff --git a/spring-eai-core/src/main/java/org/springframework/integration/config/SubscriberAnnotationPostProcessor.java b/spring-eai-core/src/main/java/org/springframework/integration/config/SubscriberAnnotationPostProcessor.java index cf90f9090d..5fd760657a 100644 --- a/spring-eai-core/src/main/java/org/springframework/integration/config/SubscriberAnnotationPostProcessor.java +++ b/spring-eai-core/src/main/java/org/springframework/integration/config/SubscriberAnnotationPostProcessor.java @@ -21,6 +21,7 @@ import java.lang.reflect.Method; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.springframework.aop.framework.Advised; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; diff --git a/spring-eai-core/src/main/java/org/springframework/integration/endpoint/AbstractChannelAdapter.java b/spring-eai-core/src/main/java/org/springframework/integration/endpoint/AbstractChannelAdapter.java index ce069de5ad..0127e0c352 100644 --- a/spring-eai-core/src/main/java/org/springframework/integration/endpoint/AbstractChannelAdapter.java +++ b/spring-eai-core/src/main/java/org/springframework/integration/endpoint/AbstractChannelAdapter.java @@ -72,7 +72,7 @@ public abstract class AbstractChannelAdapter implements MessageChannel, Initiali return this.sendObject(source); } catch (Exception e) { - throw new MessageHandlingException("Failed to send message to target", e); + throw new MessageHandlingException("failed to send message", e); } } diff --git a/spring-eai-core/src/main/java/org/springframework/integration/endpoint/annotation/AnnotationHandlerCreator.java b/spring-eai-core/src/main/java/org/springframework/integration/endpoint/annotation/AnnotationHandlerCreator.java index 5a7ac09dc8..7189c24ece 100644 --- a/spring-eai-core/src/main/java/org/springframework/integration/endpoint/annotation/AnnotationHandlerCreator.java +++ b/spring-eai-core/src/main/java/org/springframework/integration/endpoint/annotation/AnnotationHandlerCreator.java @@ -22,6 +22,9 @@ import java.lang.reflect.Method; import org.springframework.integration.handler.MessageHandler; /** + * A strategy for programmatically creating a {@link MessageHandler} based on + * metadata provided by an annotation. + * * @author Mark Fisher */ public interface AnnotationHandlerCreator { diff --git a/spring-eai-core/src/main/java/org/springframework/integration/endpoint/annotation/DefaultAnnotationHandlerCreator.java b/spring-eai-core/src/main/java/org/springframework/integration/endpoint/annotation/DefaultAnnotationHandlerCreator.java index 4f6dfceade..aa4cdcc306 100644 --- a/spring-eai-core/src/main/java/org/springframework/integration/endpoint/annotation/DefaultAnnotationHandlerCreator.java +++ b/spring-eai-core/src/main/java/org/springframework/integration/endpoint/annotation/DefaultAnnotationHandlerCreator.java @@ -25,6 +25,11 @@ import org.springframework.integration.endpoint.MessageHandlerAdapter; import org.springframework.integration.handler.MessageHandler; /** + * Default implementation of the handler creator strategy that creates a + * {@link MessageHandlerAdapter} for the provided object and method. This + * version does not even consider the annotation itself. It does however + * respect an {@link Order} annotation if present. + * * @author Mark Fisher */ public class DefaultAnnotationHandlerCreator implements AnnotationHandlerCreator {