Skip to content

Commit fde3b20

Browse files
committed
Fix Sonar issues
1 parent 459b34c commit fde3b20

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

spring-kafka-test/src/main/java/org/springframework/kafka/test/utils/ContainerTestUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private ContainerTestUtils() {
4646
* @throws ContainerTestUtilsException if the call to the container's
4747
* getAssignedPartitions() method fails.
4848
*/
49-
public static void waitForAssignment(Object container, int partitions) {
49+
public static void waitForAssignment(Object container, int partitions) { // NOSONAR complexity
5050
if (container.getClass().getSimpleName().contains("KafkaMessageListenerContainer")) {
5151
waitForSingleContainerAssignment(container, partitions);
5252
return;

spring-kafka/src/main/java/org/springframework/kafka/listener/KafkaMessageListenerContainer.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,10 +1558,8 @@ private ConsumerRecord<K, V> checkEarlyIntercept(ConsumerRecord<K, V> nextArg) {
15581558
ConsumerRecord<K, V> next = nextArg;
15591559
if (this.earlyRecordInterceptor != null) {
15601560
next = this.earlyRecordInterceptor.intercept(next);
1561-
if (next == null) {
1562-
if (this.logger.isDebugEnabled()) {
1563-
this.logger.debug("RecordInterceptor returned null, skipping: " + next);
1564-
}
1561+
if (next == null && this.logger.isDebugEnabled()) {
1562+
this.logger.debug("RecordInterceptor returned null, skipping: " + nextArg);
15651563
}
15661564
}
15671565
return next;

0 commit comments

Comments
 (0)