Skip to content

Commit 5731d76

Browse files
committed
Sonar Fixes
1 parent 55b16f1 commit 5731d76

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,8 @@ protected static class CloseSafeProducer<K, V> implements Producer<K, V> {
394394
this(delegate, cache, null);
395395
}
396396

397-
CloseSafeProducer(Producer<K, V> delegate, BlockingQueue<CloseSafeProducer<K, V>> cache,
398-
Consumer<CloseSafeProducer<K, V>> removeConsumerProducer) {
397+
CloseSafeProducer(Producer<K, V> delegate, @Nullable BlockingQueue<CloseSafeProducer<K, V>> cache,
398+
@Nullable Consumer<CloseSafeProducer<K, V>> removeConsumerProducer) {
399399
this.delegate = delegate;
400400
this.cache = cache;
401401
this.removeConsumerProducer = removeConsumerProducer;

spring-kafka/src/main/java/org/springframework/kafka/requestreply/CorrelationKey.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public final class CorrelationKey {
3535

3636
private volatile Integer hashCode;
3737

38-
public CorrelationKey(byte[] correlationId) {
38+
public CorrelationKey(byte[] correlationId) { // NOSONAR array reference
3939
Assert.notNull(correlationId, "'correlationId' cannot be null");
40-
this.correlationId = correlationId;
40+
this.correlationId = correlationId; // NOSONAR array reference
4141
}
4242

4343
public byte[] getCorrelationId() {

spring-kafka/src/main/java/org/springframework/kafka/support/serializer/DeserializationException.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ public class DeserializationException extends KafkaException {
3333

3434
private final boolean isKey;
3535

36-
public DeserializationException(String message, byte[] data, boolean isKey, Throwable cause) {
36+
public DeserializationException(String message, byte[] data, boolean isKey, Throwable cause) { // NOSONAR array reference
3737
super(message, cause);
38-
this.data = data;
38+
this.data = data; // NOSONAR array reference
3939
this.isKey = isKey;
4040
}
4141

4242
public byte[] getData() {
43-
return this.data;
43+
return this.data; // NOSONAR array reference
4444
}
4545

4646
public boolean isKey() {

0 commit comments

Comments
 (0)