Skip to content

Commit 920089b

Browse files
committed
Fix Sonar Issue
1 parent 21a5ada commit 920089b

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3149,17 +3149,23 @@ private OffsetAndMetadata createOffsetAndMetadata(long offset) {
31493149

31503150
private final class ConsumerAwareListenerMetadata implements ListenerMetadata {
31513151

3152+
ConsumerAwareListenerMetadata() {
3153+
}
3154+
31523155
@Override
3156+
@Nullable
31533157
public String getListenerId() {
31543158
return getBeanName();
31553159
}
31563160

31573161
@Override
3162+
@Nullable
31583163
public String getGroupId() {
31593164
return ListenerConsumer.this.consumerGroupId;
31603165
}
31613166

31623167
@Override
3168+
@Nullable
31633169
public byte[] getListenerInfo() {
31643170
return ListenerConsumer.this.listenerinfo;
31653171
}

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,13 @@
1616

1717
package org.springframework.kafka.listener;
1818

19+
import org.springframework.lang.Nullable;
20+
1921
/**
2022
* Metadata associated to a {@link org.springframework.kafka.annotation.KafkaListener}.
2123
*
2224
* @author Francois Rosiere
25+
* @author Gary Russell
2326
* @since 2.8.5
2427
* @see org.springframework.kafka.annotation.KafkaListener
2528
*/
@@ -29,17 +32,21 @@ public interface ListenerMetadata {
2932
* Return the listener id.
3033
* @return the listener id.
3134
*/
35+
@Nullable
3236
String getListenerId();
3337

3438
/**
3539
* Return the group id.
3640
* @return the group id.
3741
*/
42+
@Nullable
3843
String getGroupId();
3944

4045
/**
4146
* Return the listener info.
4247
* @return the listener info.
4348
*/
49+
@Nullable
4450
byte[] getListenerInfo();
51+
4552
}

0 commit comments

Comments
 (0)