Skip to content

Commit 5a98a51

Browse files
garyrussellartembilan
authored andcommitted
Fix default deserializer getters
Since the getters are `@Nullable` the default implementation should return `null` instead of throwing an `UnsupportedOperationException`.
1 parent d61aec4 commit 5a98a51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ default Map<String, Object> getConfigurationProperties() {
122122
*/
123123
@Nullable
124124
default Deserializer<K> getKeyDeserializer() {
125-
throw new UnsupportedOperationException("'getKeyDeserializer()' is not supported");
125+
return null;
126126
}
127127

128128
/**
@@ -133,7 +133,7 @@ default Deserializer<K> getKeyDeserializer() {
133133
*/
134134
@Nullable
135135
default Deserializer<V> getValueDeserializer() {
136-
throw new UnsupportedOperationException("'getKeyDeserializer()' is not supported");
136+
return null;
137137
}
138138

139139
}

0 commit comments

Comments
 (0)