Skip to content

Commit 9623116

Browse files
committed
Fix Compiler Warnings
Also fix javadoc for previous commit.
1 parent 279b753 commit 9623116

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

spring-kafka/src/main/java/org/springframework/kafka/annotation/KafkaListener.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,11 @@
310310

311311
/**
312312
* Static information that will be added as a header with key
313-
* {@link org.springframework.kafka.support.KafkaHeaders#LISTENER_INFO}. This can be used, for example, in a
314-
* {@link org.springframework.kafka.listener.RecordInterceptor}, {@link RecordFiorg.springframework.kafka.listener.adapter.RecordFilterStrategylterStrategy} or the listener itself, for
315-
* any purposes.
313+
* {@link org.springframework.kafka.support.KafkaHeaders#LISTENER_INFO}. This can be
314+
* used, for example, in a
315+
* {@link org.springframework.kafka.listener.RecordInterceptor},
316+
* {@link org.springframework.kafka.listener.adapter.RecordFilterStrategy} or the
317+
* listener itself, for any purposes.
316318
* <p>
317319
* SpEL {@code #{...}} and property place holders {@code ${...}} are supported, but it
318320
* must resolve to a String or `byte[]`.

spring-kafka/src/main/java/org/springframework/kafka/annotation/KafkaListenerAnnotationBeanPostProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ private void resolveContentTypeConverter(MethodKafkaListenerEndpoint<?, ?> endpo
643643
}
644644
}
645645

646+
@SuppressWarnings({ "rawtypes", "unchecked" })
646647
private void resolveFilter(MethodKafkaListenerEndpoint<?, ?> endpoint, KafkaListener kafkaListener) {
647648
Object filter = resolveExpression(kafkaListener.filter());
648649
if (filter instanceof RecordFilterStrategy) {

spring-kafka/src/main/java/org/springframework/kafka/config/AbstractKafkaListenerContainerFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ public C createListenerContainer(KafkaListenerEndpoint endpoint) {
395395
return instance;
396396
}
397397

398+
@SuppressWarnings("deprecation")
398399
private void configureEndpoint(AbstractKafkaListenerEndpoint<K, V> aklEndpoint) {
399400
if (aklEndpoint.getRecordFilterStrategy() == null) {
400401
JavaUtils.INSTANCE

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ public final void addRetryableExceptions(Class<? extends Exception>... exception
134134
add(true, exceptionTypes);
135135
}
136136

137-
private void add(boolean classified, Class<? extends Exception>... exceptionTypes) {
137+
@SafeVarargs
138+
@SuppressWarnings("varargs")
139+
private final void add(boolean classified, Class<? extends Exception>... exceptionTypes) {
138140
Assert.notNull(exceptionTypes, "'exceptionTypes' cannot be null");
139141
Assert.noNullElements(exceptionTypes, "'exceptionTypes' cannot contain nulls");
140142
for (Class<? extends Exception> exceptionType : exceptionTypes) {

spring-kafka/src/main/java/org/springframework/kafka/retrytopic/RetryTopicConfigurer.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 the original author or authors.
2+
* Copyright 2018-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -371,6 +371,7 @@ private EndpointHandlerMethod getDltEndpointHandlerMethodOrDefault(EndpointHandl
371371
return dltEndpointHandlerMethod != null ? dltEndpointHandlerMethod : DEFAULT_DLT_HANDLER;
372372
}
373373

374+
@SuppressWarnings("deprecation")
374375
private KafkaListenerContainerFactory<?> resolveAndConfigureFactoryForMainEndpoint(
375376
KafkaListenerContainerFactory<?> providedFactory,
376377
String defaultFactoryBeanName, RetryTopicConfiguration configuration) {
@@ -386,6 +387,7 @@ private KafkaListenerContainerFactory<?> resolveAndConfigureFactoryForMainEndpoi
386387
configuration.forContainerFactoryConfigurer());
387388
}
388389

390+
@SuppressWarnings("deprecation")
389391
private KafkaListenerContainerFactory<?> resolveAndConfigureFactoryForRetryEndpoint(
390392
KafkaListenerContainerFactory<?> providedFactory,
391393
String defaultFactoryBeanName,

0 commit comments

Comments
 (0)