Skip to content

Commit ea302e3

Browse files
committed
remove @SuppressWarnings("NullAway")
Signed-off-by: Jiandong Ma <[email protected]>
1 parent 58d36c4 commit ea302e3

File tree

4 files changed

+2
-7
lines changed

4 files changed

+2
-7
lines changed

spring-integration-kafka/src/main/java/org/springframework/integration/kafka/channel/PollableKafkaChannel.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,10 @@ public boolean hasExecutorInterceptors() {
196196
return this.executorInterceptorsSize > 0;
197197
}
198198

199-
@SuppressWarnings("NullAway")
200199
private static String topic(KafkaMessageSource<?, ?> source) {
201200
Assert.notNull(source, "'source' cannot be null");
202-
String[] topics = source.getConsumerProperties().getTopics();
203-
Assert.isTrue(topics != null && topics.length == 1, "Only one topic is allowed");
201+
@Nullable String @Nullable [] topics = source.getConsumerProperties().getTopics();
202+
Assert.isTrue(topics != null && topics.length == 1 && topics[0] != null, "Only one topic is allowed");
204203
return topics[0];
205204
}
206205

spring-integration-kafka/src/main/java/org/springframework/integration/kafka/channel/SubscribableKafkaChannel.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ public boolean unsubscribe(MessageHandler handler) {
179179
return this.dispatcher.removeHandler(handler);
180180
}
181181

182-
@SuppressWarnings("NullAway")
183182
private class IntegrationRecordMessageListener extends RecordMessagingMessageListenerAdapter<Object, Object> {
184183

185184
IntegrationRecordMessageListener() {

spring-integration-kafka/src/main/java/org/springframework/integration/kafka/inbound/KafkaInboundGateway.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ protected AttributeAccessor getErrorMessageAttributes(@Nullable Message<?> messa
281281
}
282282
}
283283

284-
@SuppressWarnings("NullAway")
285284
private class IntegrationRecordMessageListener extends RecordMessagingMessageListenerAdapter<K, V> {
286285

287286
IntegrationRecordMessageListener() {

spring-integration-kafka/src/main/java/org/springframework/integration/kafka/inbound/KafkaMessageDrivenChannelAdapter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ public enum ListenerMode {
422422
batch
423423
}
424424

425-
@SuppressWarnings("NullAway")
426425
private class IntegrationRecordMessageListener extends RecordMessagingMessageListenerAdapter<K, V> {
427426

428427
IntegrationRecordMessageListener() {
@@ -512,7 +511,6 @@ else if (KafkaMessageDrivenChannelAdapter.this.containerDeliveryAttemptPresent)
512511

513512
}
514513

515-
@SuppressWarnings("NullAway")
516514
private class IntegrationBatchMessageListener extends BatchMessagingMessageListenerAdapter<K, V> {
517515

518516
IntegrationBatchMessageListener() {

0 commit comments

Comments
 (0)