In what version(s) of Spring for Apache Kafka are you seeing this issue?
For 3.3.15 and 4.0.0+
Describe the bug
Due to addition of .clone() In case of Empty properties in StreamsBuilderFactoryBean
Cannot invoke "java.util.Properties.clone()" because "this.properties" is null
java.lang.NullPointerException: Cannot invoke "java.util.Properties.clone()" because "this.properties" is null
at org.springframework.kafka.config.StreamsBuilderFactoryBean.getStreamsConfiguration(StreamsBuilderFactoryBean.java:171)
at org.springframework.kafka.streams.KafkaStreamsInteractiveQueryService.getCurrentKafkaStreamsApplicationHostInfo(KafkaStreamsInteractiveQueryService.java:117)
at com.example.demo.KafkaStreamsConfigIntegrationTest.currentHostInfoWithNoProperties(KafkaStreamsConfigIntegrationTest.java:184)
To Reproduce
Test case to test behaviour.
@Test
void currentHostInfoWithNoProperties() {
StreamsBuilderFactoryBean sbfb = new StreamsBuilderFactoryBean();
sbfb.setAutoStartup(false);
KafkaStreamsInteractiveQueryService iqs = new KafkaStreamsInteractiveQueryService(sbfb);
HostInfo currentKafkaStreamsApplicationHostInfo = iqs.getCurrentKafkaStreamsApplicationHostInfo();
assertThat(currentKafkaStreamsApplicationHostInfo).isNull();
}
Expected behavior
Properties should be returned as Empty and no null pointer exception is shown. When calling StreamsBuilderFactoryBean.getStreamsConfiguration()
Reports that include a sample will take priority over reports that do not.
At times, we may require a sample, so it is good to try and include a sample up front.
In what version(s) of Spring for Apache Kafka are you seeing this issue?
For 3.3.15 and 4.0.0+
Describe the bug
Due to addition of .clone() In case of Empty properties in
StreamsBuilderFactoryBeanTo Reproduce
Test case to test behaviour.
Expected behavior
Properties should be returned as Empty and no null pointer exception is shown. When calling
StreamsBuilderFactoryBean.getStreamsConfiguration()Reports that include a sample will take priority over reports that do not.
At times, we may require a sample, so it is good to try and include a sample up front.