Skip to content

Commit 30d242b

Browse files
authored
Add @nullable for ProducerFactory & ConsumerFactory interfaces to enable null records. (#4367)
Fixes: #4355 **Auto-cherry-pick to `4.0.x`** Signed-off-by: jad837 <jadhavsaurabh037@gmail.com>
1 parent 49eeffa commit 30d242b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-kafka/src/main/java/org/springframework/kafka/core/ConsumerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
* @author Gary Russell
3535
* @author Artem Bilan
3636
*/
37-
public interface ConsumerFactory<K, V> {
37+
public interface ConsumerFactory<K, V extends @Nullable Object> {
3838

3939
/**
4040
* Create a consumer with the group id and client id as configured in the properties.

spring-kafka/src/main/java/org/springframework/kafka/core/ProducerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* @author Thomas Strauß
3737
* @author Kwon YongHyun
3838
*/
39-
public interface ProducerFactory<K, V> {
39+
public interface ProducerFactory<K, V extends @Nullable Object> {
4040

4141
/**
4242
* The default close timeout duration as 30 seconds.

0 commit comments

Comments
 (0)