Skip to content

Commit 5188f63

Browse files
committed
Upgrade checkstyle; fix violations
- a checkstyle bug prevented detection of javadoc tag ordering
1 parent 3b6c8b9 commit 5188f63

18 files changed

+30
-38
lines changed

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ subprojects { subproject ->
203203

204204
checkstyle {
205205
configDirectory.set(rootProject.file("src/checkstyle"))
206-
toolVersion = '8.38'
206+
toolVersion = '9.0'
207207
}
208208

209209
jacocoTestReport {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ public void setStateListener(KafkaStreams.StateListener stateListener) {
193193

194194
/**
195195
* Obsolete.
196+
* @param exceptionHandler the handler.
196197
* @deprecated in favor of
197198
* {@link #setStreamsUncaughtExceptionHandler(StreamsUncaughtExceptionHandler)}.
198-
* @param exceptionHandler the handler.
199199
*/
200200
@Deprecated
201201
public void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler exceptionHandler) {

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@
2222
* implementation of this interface is found in the application context (or one is marked
2323
* as {@link org.springframework.context.annotation.Primary}, it will be invoked after the
2424
* factory bean has been created and before it is started.
25-
* @deprecated in favor of {@code StreamsBuilderFactoryBeanConfigurer} due to a name
26-
* clash with a similar class in Spring Boot.
2725
*
2826
* @author Gary Russell
2927
* @since 2.3
30-
*
28+
* @deprecated in favor of {@code StreamsBuilderFactoryBeanConfigurer} due to a name
29+
* clash with a similar class in Spring Boot.
3130
*/
3231
@Deprecated
3332
@FunctionalInterface

spring-kafka/src/main/java/org/springframework/kafka/event/KafkaEvent.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2020 the original author or authors.
2+
* Copyright 2015-2021 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.
@@ -45,8 +45,8 @@ public KafkaEvent(Object source, Object container) {
4545
* @param type the container type (e.g. {@code MessageListenerContainer.class}).
4646
* @param <T> the type.
4747
* @return the container.
48-
* @see #getSource(Class)
4948
* @since 2.2.1
49+
* @see #getSource(Class)
5050
*/
5151
@SuppressWarnings("unchecked")
5252
public <T> T getContainer(Class<T> type) {
@@ -62,9 +62,9 @@ public <T> T getContainer(Class<T> type) {
6262
* @param type the container type (e.g. {@code MessageListenerContainer.class}).
6363
* @param <T> the type.
6464
* @return the container.
65+
* @since 2.2.1
6566
* @see #getContainer(Class)
6667
* @see #getSource()
67-
* @since 2.2.1
6868
*/
6969
@SuppressWarnings("unchecked")
7070
public <T> T getSource(Class<T> type) {

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,9 @@
2727
/**
2828
* Simple handler that logs each record.
2929
*
30-
* @deprecated - use the {@link CommonLoggingErrorHandler} instead.
31-
*
3230
* @author Gary Russell
3331
* @since 1.1
32+
* @deprecated - use the {@link CommonLoggingErrorHandler} instead.
3433
*/
3534
@Deprecated
3635
public class BatchLoggingErrorHandler implements BatchErrorHandler {

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,9 @@
3030
* An error handler that delegates to different error handlers, depending on the exception
3131
* type.
3232
*
33-
* @deprecated in favor of {@link CommonDelegatingErrorHandler}.
34-
*
3533
* @author Gary Russell
3634
* @since 2.7.4
37-
*
35+
* @deprecated in favor of {@link CommonDelegatingErrorHandler}.
3836
*/
3937
@Deprecated
4038
public class ConditionalDelegatingBatchErrorHandler implements ListenerInvokingBatchErrorHandler {

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@
3131
* An error handler that delegates to different error handlers, depending on the exception
3232
* type.
3333
*
34-
* @deprecated in favor of {@link CommonDelegatingErrorHandler}.
35-
*
3634
* @author Gary Russell
3735
* @since 2.7.4
38-
*
36+
* @deprecated in favor of {@link CommonDelegatingErrorHandler}.
3937
*/
4038
@Deprecated
4139
public class ConditionalDelegatingErrorHandler implements ContainerAwareErrorHandler {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ public enum EOSMode {
179179

180180
/**
181181
* Create an alias.
182-
* @param v22 the mode for which this is an alias.
182+
* @param v12 the mode for which this is an alias.
183183
*/
184184
EOSMode(EOSMode v12) {
185185
this.mode = v12;

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
* A container error handler that stops the container after an exception
3131
* is thrown by the listener.
3232
*
33-
* @deprecated in favor of {@link CommonContainerStoppingErrorHandler}.
34-
*
3533
* @author Gary Russell
3634
* @since 2.1
35+
* @deprecated in favor of {@link CommonContainerStoppingErrorHandler}.
3736
*
3837
*/
3938
@Deprecated

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
* A container error handler that stops the container after an exception
3131
* is thrown by the listener.
3232
*
33-
* @deprecated in favor of {@link CommonContainerStoppingErrorHandler}.
34-
*
3533
* @author Gary Russell
3634
* @since 2.1
35+
* @deprecated in favor of {@link CommonContainerStoppingErrorHandler}.
3736
*
3837
*/
3938
@Deprecated

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

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@
2525
/**
2626
* The {@link ErrorHandler} implementation for logging purpose.
2727
*
28-
* @deprecated - use the {@link CommonLoggingErrorHandler} instead.
29-
*
3028
* @author Marius Bogoevici
3129
* @author Gary Russell
30+
* @deprecated - use the {@link CommonLoggingErrorHandler} instead.
3231
*/
3332
@Deprecated
3433
public class LoggingErrorHandler implements ErrorHandler {

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,10 @@
3535
* exception, error handling is delegated to a {@link SeekToCurrentBatchErrorHandler} with
3636
* this handler's {@link BackOff}. If the record is recovered, its offset is committed.
3737
*
38-
* @deprecated in favor of {@link DefaultErrorHandler}.
39-
*
4038
* @author Gary Russell
4139
* @author Myeonghyeon Lee
4240
* @since 2.5
43-
*
41+
* @deprecated in favor of {@link DefaultErrorHandler}.
4442
*/
4543
@Deprecated
4644
public class RecoveringBatchErrorHandler extends FailedBatchProcessor

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@
3131
* An error handler that seeks to the current offset for each topic in a batch of records.
3232
* Used to rewind partitions after a message failure so that the batch can be replayed.
3333
*
34-
* @deprecated with no replacement - use {@link DefaultErrorHandler} with an infinite
35-
* {@link BackOff}.
36-
*
3734
* @author Gary Russell
3835
* @since 2.1
39-
*
36+
* @deprecated with no replacement - use {@link DefaultErrorHandler} with an infinite
37+
* {@link BackOff}.
4038
*/
4139
@Deprecated
4240
public class SeekToCurrentBatchErrorHandler extends KafkaExceptionLogLevelAware

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,11 @@
3030
* records. Used to rewind partitions after a message failure so that it can be
3131
* replayed.
3232
*
33-
* @deprecated in favor of {@link DefaultErrorHandler}.
34-
*
3533
* @author Gary Russell
3634
* @author Artem Bilan
3735
*
3836
* @since 2.0.1
39-
*
37+
* @deprecated in favor of {@link DefaultErrorHandler}.
4038
*/
4139
@Deprecated
4240
public class SeekToCurrentErrorHandler extends FailedRecordProcessor implements ContainerAwareErrorHandler {

spring-kafka/src/main/java/org/springframework/kafka/listener/adapter/DelegatingInvocableHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ public DelegatingInvocableHandler(List<InvocableHandlerMethod> handlers, Object
108108
* @param bean the bean.
109109
* @param beanExpressionResolver the resolver.
110110
* @param beanExpressionContext the context.
111+
* @since 2.1.3
111112
* @deprecated in favor of
112113
* {@link #DelegatingInvocableHandler(List, InvocableHandlerMethod, Object, BeanExpressionResolver, BeanExpressionContext, BeanFactory, Validator)}
113-
* @since 2.1.3
114114
*/
115115
@Deprecated
116116
public DelegatingInvocableHandler(List<InvocableHandlerMethod> handlers,

spring-kafka/src/main/java/org/springframework/kafka/listener/adapter/RetryingMessageListenerAdapter.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@
3535
* @param <K> the key type.
3636
* @param <V> the value type.
3737
*
38-
* @deprecated since 2.8 - use a suitably configured error handler instead.
39-
*
4038
* @author Gary Russell
39+
* @deprecated since 2.8 - use a suitably configured error handler instead.
4140
*
4241
*/
4342
@Deprecated

spring-kafka/src/main/java/org/springframework/kafka/support/mapping/Jackson2JavaTypeMapper.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,16 @@ public interface Jackson2JavaTypeMapper extends ClassMapper {
3939
* headers. Only applies if both exist.
4040
*/
4141
enum TypePrecedence {
42-
INFERRED, TYPE_ID
42+
43+
/**
44+
* The type is inferred from the destination method.
45+
*/
46+
INFERRED,
47+
48+
/**
49+
* The type is obtained from headers.
50+
*/
51+
TYPE_ID
4352
}
4453

4554
void fromJavaType(JavaType javaType, Headers headers);

src/checkstyle/checkstyle.xml

-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
<property name="authorFormat" value=".+\s.+"/>
111111
</module>
112112
<module name="JavadocMethod">
113-
<property name="scope" value="public"/>
114113
</module>
115114
<module name="JavadocVariable">
116115
<property name="scope" value="public"/>

0 commit comments

Comments
 (0)