Skip to content

Commit 206e68f

Browse files
authored
Default Empty Map for PF configurationProperties
The default behavior was to throw an `UnsupportedOperationException` which effectively makes the `MockProducerFactory` unusable without subclassing, e.g. in `spring-integration-kafka`, which calls that method to examine some properties. Change the default behavior to return an empty map.
1 parent 54601b1 commit 206e68f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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
@@ -123,7 +123,7 @@ default void reset() {
123123
* @since 2.5
124124
*/
125125
default Map<String, Object> getConfigurationProperties() {
126-
throw new UnsupportedOperationException("This implementation doesn't support this method");
126+
return Collections.emptyMap();
127127
}
128128

129129
/**

0 commit comments

Comments
 (0)