diff --git a/spring-kafka/src/main/java/org/springframework/kafka/annotation/DltHandler.java b/spring-kafka/src/main/java/org/springframework/kafka/annotation/DltHandler.java index 20815198a5..272c363d41 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/annotation/DltHandler.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/annotation/DltHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2021 the original author or authors. + * Copyright 2018-2023 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. @@ -27,7 +27,7 @@ import java.lang.annotation.Target; /** - * Annotation to determine the method the should process the DLT topic message. + * Annotation to determine the method that should process the DLT topic message. * The method can have the same parameters as a {@link KafkaListener} method can (Message, Acknowledgement, etc). * * The annotated method must be in the same class as the corresponding {@link KafkaListener} annotation. diff --git a/spring-kafka/src/main/java/org/springframework/kafka/core/ConsumerFactory.java b/spring-kafka/src/main/java/org/springframework/kafka/core/ConsumerFactory.java index 9f259bf7e3..2b0f9b86d4 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/core/ConsumerFactory.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/core/ConsumerFactory.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2021 the original author or authors. + * Copyright 2016-2023 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. @@ -27,7 +27,7 @@ import org.springframework.lang.Nullable; /** - * The strategy to produce a {@link Consumer} instance(s). + * The strategy to produce a {@link Consumer} instance. * * @param the key type. * @param the value type. @@ -79,8 +79,10 @@ default Consumer createConsumer(@Nullable String groupId, @Nullable String * @return the consumer. * @since 2.1.1 */ - Consumer createConsumer(@Nullable String groupId, @Nullable String clientIdPrefix, - @Nullable String clientIdSuffix); + default Consumer createConsumer(@Nullable String groupId, @Nullable String clientIdPrefix, + @Nullable String clientIdSuffix) { + return createConsumer(groupId, clientIdPrefix, clientIdSuffix, null); + } /** * Create a consumer with an explicit group id; in addition, the @@ -94,11 +96,8 @@ Consumer createConsumer(@Nullable String groupId, @Nullable String clientI * @return the consumer. * @since 2.2.4 */ - default Consumer createConsumer(@Nullable String groupId, @Nullable String clientIdPrefix, - @Nullable String clientIdSuffix, @Nullable Properties properties) { - - return createConsumer(groupId, clientIdPrefix, clientIdSuffix); - } + Consumer createConsumer(@Nullable String groupId, @Nullable String clientIdPrefix, + @Nullable String clientIdSuffix, @Nullable Properties properties); /** * Return true if consumers created by this factory use auto commit. @@ -155,7 +154,6 @@ default boolean removeListener(Listener listener) { * @since 2.5.3 */ default void addListener(int index, Listener listener) { - } /** @@ -164,7 +162,6 @@ default void addListener(int index, Listener listener) { * @since 2.5.3 */ default void addListener(Listener listener) { - } /** @@ -182,7 +179,6 @@ default List> getListeners() { * @since 2.5.3 */ default void addPostProcessor(ConsumerPostProcessor postProcessor) { - } /** diff --git a/spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaConsumerFactory.java b/spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaConsumerFactory.java index 69dba9da56..873e0fdb91 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaConsumerFactory.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/core/DefaultKafkaConsumerFactory.java @@ -352,13 +352,6 @@ public void removeConfig(String configKey) { this.configs.remove(configKey); } - @Override - public Consumer createConsumer(@Nullable String groupId, @Nullable String clientIdPrefix, - @Nullable String clientIdSuffix) { - - return createKafkaConsumer(groupId, clientIdPrefix, clientIdSuffix, null); - } - @Override public Consumer createConsumer(@Nullable String groupId, @Nullable String clientIdPrefix, @Nullable final String clientIdSuffixArg, @Nullable Properties properties) { diff --git a/spring-kafka/src/main/java/org/springframework/kafka/security/jaas/KafkaJaasLoginModuleInitializer.java b/spring-kafka/src/main/java/org/springframework/kafka/security/jaas/KafkaJaasLoginModuleInitializer.java index 6a2a8236bb..e0def23d1c 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/security/jaas/KafkaJaasLoginModuleInitializer.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/security/jaas/KafkaJaasLoginModuleInitializer.java @@ -162,8 +162,8 @@ private static class InternalConfiguration extends Configuration { private final Configuration delegate; InternalConfiguration(Map configurationEntries, Configuration delegate) { - Assert.notNull(configurationEntries, " cannot be null"); - Assert.notEmpty(configurationEntries, " cannot be empty"); + Assert.notNull(configurationEntries, "'configurationEntries' cannot be null"); + Assert.notEmpty(configurationEntries, "'configurationEntries' cannot be empty"); this.configurationEntries = configurationEntries; this.delegate = delegate; }