GH-3917: Fix CommonMixedErrorHandler ctor for proper validation

Fixes: #3917
Issue link: https://github.com/spring-projects/spring-kafka/issues/3917

* Fixed a null check issue in the constructor of `CommonMixedErrorHandler`

Signed-off-by: JaeYeon Kim <ghgh415263@naver.com>

(cherry picked from commit 982b532d98)
This commit is contained in:
Kim JaeYeon
2025-05-23 02:17:40 +09:00
committed by Spring Builds
parent 997325b002
commit f4f1fe32b4

View File

@@ -30,6 +30,7 @@ import org.springframework.util.Assert;
* for record and batch listeners.
*
* @author Gary Russell
* @author JaeYeon Kim
* @since 2.8
*
*/
@@ -46,7 +47,7 @@ public class CommonMixedErrorHandler implements CommonErrorHandler {
*/
public CommonMixedErrorHandler(CommonErrorHandler recordErrorHandler, CommonErrorHandler batchErrorHandler) {
Assert.notNull(recordErrorHandler, "'recordErrorHandler' cannot be null");
Assert.notNull(recordErrorHandler, "'batchErrorHandler' cannot be null");
Assert.notNull(batchErrorHandler, "'batchErrorHandler' cannot be null");
this.recordErrorHandler = recordErrorHandler;
this.batchErrorHandler = batchErrorHandler;
}