Upgrade checkstyle; fix violations

- a checkstyle bug prevented detection of javadoc tag ordering
This commit is contained in:
Gary Russell
2021-09-27 16:14:00 -04:00
parent 3b6c8b9a49
commit 5188f63a5f
18 changed files with 30 additions and 38 deletions

View File

@@ -203,7 +203,7 @@ subprojects { subproject ->
checkstyle {
configDirectory.set(rootProject.file("src/checkstyle"))
toolVersion = '8.38'
toolVersion = '9.0'
}
jacocoTestReport {

View File

@@ -193,9 +193,9 @@ public class StreamsBuilderFactoryBean extends AbstractFactoryBean<StreamsBuilde
/**
* Obsolete.
* @param exceptionHandler the handler.
* @deprecated in favor of
* {@link #setStreamsUncaughtExceptionHandler(StreamsUncaughtExceptionHandler)}.
* @param exceptionHandler the handler.
*/
@Deprecated
public void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler exceptionHandler) {

View File

@@ -22,12 +22,11 @@ package org.springframework.kafka.config;
* implementation of this interface is found in the application context (or one is marked
* as {@link org.springframework.context.annotation.Primary}, it will be invoked after the
* factory bean has been created and before it is started.
* @deprecated in favor of {@code StreamsBuilderFactoryBeanConfigurer} due to a name
* clash with a similar class in Spring Boot.
*
* @author Gary Russell
* @since 2.3
*
* @deprecated in favor of {@code StreamsBuilderFactoryBeanConfigurer} due to a name
* clash with a similar class in Spring Boot.
*/
@Deprecated
@FunctionalInterface

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2015-2020 the original author or authors.
* Copyright 2015-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -45,8 +45,8 @@ public abstract class KafkaEvent extends ApplicationEvent {
* @param type the container type (e.g. {@code MessageListenerContainer.class}).
* @param <T> the type.
* @return the container.
* @see #getSource(Class)
* @since 2.2.1
* @see #getSource(Class)
*/
@SuppressWarnings("unchecked")
public <T> T getContainer(Class<T> type) {
@@ -62,9 +62,9 @@ public abstract class KafkaEvent extends ApplicationEvent {
* @param type the container type (e.g. {@code MessageListenerContainer.class}).
* @param <T> the type.
* @return the container.
* @since 2.2.1
* @see #getContainer(Class)
* @see #getSource()
* @since 2.2.1
*/
@SuppressWarnings("unchecked")
public <T> T getSource(Class<T> type) {

View File

@@ -27,10 +27,9 @@ import org.springframework.lang.Nullable;
/**
* Simple handler that logs each record.
*
* @deprecated - use the {@link CommonLoggingErrorHandler} instead.
*
* @author Gary Russell
* @since 1.1
* @deprecated - use the {@link CommonLoggingErrorHandler} instead.
*/
@Deprecated
public class BatchLoggingErrorHandler implements BatchErrorHandler {

View File

@@ -30,11 +30,9 @@ import org.springframework.util.Assert;
* An error handler that delegates to different error handlers, depending on the exception
* type.
*
* @deprecated in favor of {@link CommonDelegatingErrorHandler}.
*
* @author Gary Russell
* @since 2.7.4
*
* @deprecated in favor of {@link CommonDelegatingErrorHandler}.
*/
@Deprecated
public class ConditionalDelegatingBatchErrorHandler implements ListenerInvokingBatchErrorHandler {

View File

@@ -31,11 +31,9 @@ import org.springframework.util.Assert;
* An error handler that delegates to different error handlers, depending on the exception
* type.
*
* @deprecated in favor of {@link CommonDelegatingErrorHandler}.
*
* @author Gary Russell
* @since 2.7.4
*
* @deprecated in favor of {@link CommonDelegatingErrorHandler}.
*/
@Deprecated
public class ConditionalDelegatingErrorHandler implements ContainerAwareErrorHandler {

View File

@@ -179,7 +179,7 @@ public class ContainerProperties extends ConsumerProperties {
/**
* Create an alias.
* @param v22 the mode for which this is an alias.
* @param v12 the mode for which this is an alias.
*/
EOSMode(EOSMode v12) {
this.mode = v12;

View File

@@ -30,10 +30,9 @@ import org.springframework.util.Assert;
* A container error handler that stops the container after an exception
* is thrown by the listener.
*
* @deprecated in favor of {@link CommonContainerStoppingErrorHandler}.
*
* @author Gary Russell
* @since 2.1
* @deprecated in favor of {@link CommonContainerStoppingErrorHandler}.
*
*/
@Deprecated

View File

@@ -30,10 +30,9 @@ import org.springframework.util.Assert;
* A container error handler that stops the container after an exception
* is thrown by the listener.
*
* @deprecated in favor of {@link CommonContainerStoppingErrorHandler}.
*
* @author Gary Russell
* @since 2.1
* @deprecated in favor of {@link CommonContainerStoppingErrorHandler}.
*
*/
@Deprecated

View File

@@ -25,10 +25,9 @@ import org.springframework.lang.Nullable;
/**
* The {@link ErrorHandler} implementation for logging purpose.
*
* @deprecated - use the {@link CommonLoggingErrorHandler} instead.
*
* @author Marius Bogoevici
* @author Gary Russell
* @deprecated - use the {@link CommonLoggingErrorHandler} instead.
*/
@Deprecated
public class LoggingErrorHandler implements ErrorHandler {

View File

@@ -35,12 +35,10 @@ import org.springframework.util.backoff.BackOff;
* exception, error handling is delegated to a {@link SeekToCurrentBatchErrorHandler} with
* this handler's {@link BackOff}. If the record is recovered, its offset is committed.
*
* @deprecated in favor of {@link DefaultErrorHandler}.
*
* @author Gary Russell
* @author Myeonghyeon Lee
* @since 2.5
*
* @deprecated in favor of {@link DefaultErrorHandler}.
*/
@Deprecated
public class RecoveringBatchErrorHandler extends FailedBatchProcessor

View File

@@ -31,12 +31,10 @@ import org.springframework.util.backoff.BackOffExecution;
* An error handler that seeks to the current offset for each topic in a batch of records.
* Used to rewind partitions after a message failure so that the batch can be replayed.
*
* @deprecated with no replacement - use {@link DefaultErrorHandler} with an infinite
* {@link BackOff}.
*
* @author Gary Russell
* @since 2.1
*
* @deprecated with no replacement - use {@link DefaultErrorHandler} with an infinite
* {@link BackOff}.
*/
@Deprecated
public class SeekToCurrentBatchErrorHandler extends KafkaExceptionLogLevelAware

View File

@@ -30,13 +30,11 @@ import org.springframework.util.backoff.BackOff;
* records. Used to rewind partitions after a message failure so that it can be
* replayed.
*
* @deprecated in favor of {@link DefaultErrorHandler}.
*
* @author Gary Russell
* @author Artem Bilan
*
* @since 2.0.1
*
* @deprecated in favor of {@link DefaultErrorHandler}.
*/
@Deprecated
public class SeekToCurrentErrorHandler extends FailedRecordProcessor implements ContainerAwareErrorHandler {

View File

@@ -108,9 +108,9 @@ public class DelegatingInvocableHandler {
* @param bean the bean.
* @param beanExpressionResolver the resolver.
* @param beanExpressionContext the context.
* @since 2.1.3
* @deprecated in favor of
* {@link #DelegatingInvocableHandler(List, InvocableHandlerMethod, Object, BeanExpressionResolver, BeanExpressionContext, BeanFactory, Validator)}
* @since 2.1.3
*/
@Deprecated
public DelegatingInvocableHandler(List<InvocableHandlerMethod> handlers,

View File

@@ -35,9 +35,8 @@ import org.springframework.util.Assert;
* @param <K> the key type.
* @param <V> the value type.
*
* @deprecated since 2.8 - use a suitably configured error handler instead.
*
* @author Gary Russell
* @deprecated since 2.8 - use a suitably configured error handler instead.
*
*/
@Deprecated

View File

@@ -39,7 +39,16 @@ public interface Jackson2JavaTypeMapper extends ClassMapper {
* headers. Only applies if both exist.
*/
enum TypePrecedence {
INFERRED, TYPE_ID
/**
* The type is inferred from the destination method.
*/
INFERRED,
/**
* The type is obtained from headers.
*/
TYPE_ID
}
void fromJavaType(JavaType javaType, Headers headers);

View File

@@ -110,7 +110,6 @@
<property name="authorFormat" value=".+\s.+"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
</module>
<module name="JavadocVariable">
<property name="scope" value="public"/>