From 3bf78d6f8cf53310ee858af75ac3148b28c539a1 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 23 Jun 2023 12:39:14 +0200 Subject: [PATCH] Fix AbstractMessageListenerContainer Javadoc regarding error log level This commit updates AbstractMessageListenerContainer's Javadoc regarding the log level used in invokeErrorHandler() so that the documentation aligns with the implementation, namely that errors will logged at WARN level if no ErrorHandler has been registered. Closes gh-30730 --- .../jms/listener/AbstractMessageListenerContainer.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java index d8dec2f108..2d4ceb532e 100644 --- a/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java +++ b/spring-jms/src/main/java/org/springframework/jms/listener/AbstractMessageListenerContainer.java @@ -46,7 +46,7 @@ import org.springframework.util.ErrorHandler; * *

NOTE: The default behavior of this message listener container is to * never propagate an exception thrown by a message listener up to the JMS - * provider. Instead, it will log any such exception at the error level. + * provider. Instead, it will log any such exception at {@code WARN} level. * This means that from the perspective of the attendant JMS provider no such * listener will ever fail. However, if error handling is necessary, then * an implementation of the {@link ErrorHandler} strategy may be provided to @@ -877,7 +877,7 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen /** * Handle the given exception that arose during listener execution. - *

The default implementation logs the exception at warn level, + *

The default implementation logs the exception at {@code WARN} level, * not propagating it to the JMS provider — assuming that all handling of * acknowledgement and/or transactions is done by this listener container. * This can be overridden in subclasses. @@ -916,7 +916,8 @@ public abstract class AbstractMessageListenerContainer extends AbstractJmsListen } /** - * Invoke the registered ErrorHandler, if any. Log at warn level otherwise. + * Invoke the registered {@link #getErrorHandler() ErrorHandler} if any. + * Log at {@code WARN} level otherwise. * @param ex the uncaught error that arose during JMS processing * @see #setErrorHandler */