Skip to content

Commit 6b56103

Browse files
committed
Fix new Sonar smell
1 parent 1ccf14c commit 6b56103

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

spring-kafka-test/src/main/java/org/springframework/kafka/test/EmbeddedKafkaBroker.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,9 +228,7 @@ public void afterPropertiesSet() {
228228
brokerConfigProperties.setProperty(KafkaConfig.OffsetsTopicReplicationFactorProp(), "1");
229229
brokerConfigProperties.setProperty(KafkaConfig.ReplicaHighWatermarkCheckpointIntervalMsProp(),
230230
String.valueOf(Long.MAX_VALUE));
231-
if (this.brokerProperties != null) {
232-
this.brokerProperties.forEach(brokerConfigProperties::put);
233-
}
231+
this.brokerProperties.forEach(brokerConfigProperties::put);
234232
if (!this.brokerProperties.containsKey(KafkaConfig.NumPartitionsProp())) {
235233
brokerConfigProperties.setProperty(KafkaConfig.NumPartitionsProp(), "" + this.partitionsPerTopic);
236234
}

0 commit comments

Comments
 (0)