Skip to content

Commit a30fe05

Browse files
committed
Fix Sonar issue
1 parent 8876c97 commit a30fe05

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ protected Producer<K, V> createTransactionalProducer() {
407407

408408
protected Producer<K, V> createTransactionalProducer(String txIdPrefix) {
409409
BlockingQueue<CloseSafeProducer<K, V>> queue = getCache(txIdPrefix);
410+
Assert.notNull(queue, () -> "No cache found for " + txIdPrefix);
410411
Producer<K, V> cachedProducer = queue.poll();
411412
if (cachedProducer == null) {
412413
return doCreateTxProducer(txIdPrefix, "" + this.transactionIdSuffix.getAndIncrement(), null);

0 commit comments

Comments
 (0)