diff --git a/framework-docs/framework-docs.gradle b/framework-docs/framework-docs.gradle index 47be5520b2..5a0c3bec97 100644 --- a/framework-docs/framework-docs.gradle +++ b/framework-docs/framework-docs.gradle @@ -104,7 +104,7 @@ task api(type: Javadoc) { overview = "framework-docs/src/docs/api/overview.html" splitIndex = true links(project.ext.javadocLinks) - addBooleanOption('Xdoclint:syntax', true) // only check syntax with doclint + addBooleanOption('Xdoclint:syntax,reference', true) // only check syntax and reference with doclint addBooleanOption('Werror', true) // fail build on Javadoc warnings } source moduleProjects.collect { project -> diff --git a/framework-docs/modules/ROOT/pages/appendix.adoc b/framework-docs/modules/ROOT/pages/appendix.adoc index c25f35e2de..c131e439ef 100644 --- a/framework-docs/modules/ROOT/pages/appendix.adoc +++ b/framework-docs/modules/ROOT/pages/appendix.adoc @@ -25,7 +25,7 @@ The following table lists all currently supported Spring properties. | `spring.beaninfo.ignore` | Instructs Spring to use the `Introspector.IGNORE_ALL_BEANINFO` mode when calling the JavaBeans `Introspector`. See -{api-spring-framework}++/beans/CachedIntrospectionResults.html#IGNORE_BEANINFO_PROPERTY_NAME++[`CachedIntrospectionResults`] +{api-spring-framework}++/beans/StandardBeanInfoFactory.html#IGNORE_BEANINFO_PROPERTY_NAME++[`CachedIntrospectionResults`] for details. | `spring.expression.compiler.mode` diff --git a/gradle/spring-module.gradle b/gradle/spring-module.gradle index 64efe91661..130c00fe62 100644 --- a/gradle/spring-module.gradle +++ b/gradle/spring-module.gradle @@ -72,10 +72,13 @@ javadoc { options.header = project.name options.use = true options.links(project.ext.javadocLinks) - options.addStringOption("Xdoclint:none", "-quiet") + // Check for syntax during linting. 'none' doesn't seem to work in suppressing + // all linting warnings all the time (see/link references most notably). + options.addStringOption("Xdoclint:syntax", "-quiet") // Suppress warnings due to cross-module @see and @link references. - // Note that global 'api' task does display all warnings. + // Note that global 'api' task does display all warnings, and + // checks for 'reference' on top of 'syntax'. logging.captureStandardError LogLevel.INFO logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message } diff --git a/spring-core/src/main/java/org/springframework/cglib/core/CodeEmitter.java b/spring-core/src/main/java/org/springframework/cglib/core/CodeEmitter.java index a7080055a6..35181c5d89 100644 --- a/spring-core/src/main/java/org/springframework/cglib/core/CodeEmitter.java +++ b/spring-core/src/main/java/org/springframework/cglib/core/CodeEmitter.java @@ -737,7 +737,6 @@ public class CodeEmitter extends LocalVariablesSorter { * on the top of the stack with the unwrapped (primitive) * equivalent. For example, Character -> char. * @param type the class indicating the desired type of the top stack value - * @return true if the value was unboxed */ public void unbox(Type type) { Type t = Constants.TYPE_NUMBER; diff --git a/spring-core/src/main/java/org/springframework/cglib/proxy/InterfaceMaker.java b/spring-core/src/main/java/org/springframework/cglib/proxy/InterfaceMaker.java index 9ed15417a3..b1a886aee7 100644 --- a/spring-core/src/main/java/org/springframework/cglib/proxy/InterfaceMaker.java +++ b/spring-core/src/main/java/org/springframework/cglib/proxy/InterfaceMaker.java @@ -74,7 +74,7 @@ public class InterfaceMaker extends AbstractClassGenerator * Add all the public methods in the specified class. * Methods from superclasses are included, except for methods declared in the base * Object class (e.g. getClass, equals, hashCode). - * @param class the class containing the methods to add to the interface + * @param clazz the class containing the methods to add to the interface */ public void add(Class clazz) { Method[] methods = clazz.getMethods(); diff --git a/spring-core/src/main/java/org/springframework/cglib/proxy/InvocationHandler.java b/spring-core/src/main/java/org/springframework/cglib/proxy/InvocationHandler.java index cf0a35477f..a2f82fd286 100644 --- a/spring-core/src/main/java/org/springframework/cglib/proxy/InvocationHandler.java +++ b/spring-core/src/main/java/org/springframework/cglib/proxy/InvocationHandler.java @@ -28,7 +28,7 @@ public interface InvocationHandler extends Callback { /** - * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object) + * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) */ public Object invoke(Object proxy, Method method, Object[] args) throws Throwable; diff --git a/spring-core/src/main/java/org/springframework/cglib/transform/impl/UndeclaredThrowableStrategy.java b/spring-core/src/main/java/org/springframework/cglib/transform/impl/UndeclaredThrowableStrategy.java index 02667752f5..f055d20f67 100644 --- a/spring-core/src/main/java/org/springframework/cglib/transform/impl/UndeclaredThrowableStrategy.java +++ b/spring-core/src/main/java/org/springframework/cglib/transform/impl/UndeclaredThrowableStrategy.java @@ -25,7 +25,7 @@ import org.springframework.cglib.transform.MethodFilterTransformer; import org.springframework.cglib.transform.TransformingClassGenerator; /** - * A {@link GeneratorStrategy} suitable for use with {@link org.springframework.cglib.Enhancer} which + * A {@link GeneratorStrategy} suitable for use with {@link org.springframework.cglib.proxy.Enhancer} which * causes all undeclared exceptions thrown from within a proxied method to be wrapped * in an alternative exception of your choice. */ diff --git a/spring-core/src/main/java/org/springframework/cglib/util/ParallelSorter.java b/spring-core/src/main/java/org/springframework/cglib/util/ParallelSorter.java index 13241044bc..11cdf02d82 100644 --- a/spring-core/src/main/java/org/springframework/cglib/util/ParallelSorter.java +++ b/spring-core/src/main/java/org/springframework/cglib/util/ParallelSorter.java @@ -64,7 +64,6 @@ abstract public class ParallelSorter extends SorterTemplate { * @param arrays An array of arrays to sort. The arrays may be a mix * of primitive and non-primitive types, but should all be the same * length. - * @param loader ClassLoader for generated class, uses "current" if null */ public static ParallelSorter create(Object[] arrays) { Generator gen = new Generator(); @@ -135,8 +134,7 @@ abstract public class ParallelSorter extends SorterTemplate { /** * Sort the arrays using an in-place merge sort. * @param index array (column) to sort by - * @param lo starting array index (row), inclusive - * @param hi ending array index (row), exclusive + * @param cmp Comparator to use if the specified column is non-primitive */ public void mergeSort(int index, Comparator cmp) { mergeSort(index, 0, len(), cmp); diff --git a/spring-core/src/main/java/org/springframework/core/SpringProperties.java b/spring-core/src/main/java/org/springframework/core/SpringProperties.java index 7b15827d27..06916b882d 100644 --- a/spring-core/src/main/java/org/springframework/core/SpringProperties.java +++ b/spring-core/src/main/java/org/springframework/core/SpringProperties.java @@ -38,7 +38,7 @@ import org.springframework.lang.Nullable; * * @author Juergen Hoeller * @since 3.2.7 - * @see org.springframework.beans.CachedIntrospectionResults#IGNORE_BEANINFO_PROPERTY_NAME + * @see org.springframework.beans.StandardBeanInfoFactory#IGNORE_BEANINFO_PROPERTY_NAME * @see org.springframework.context.index.CandidateComponentsIndexLoader#IGNORE_INDEX * @see org.springframework.core.env.AbstractEnvironment#IGNORE_GETENV_PROPERTY_NAME * @see org.springframework.expression.spel.SpelParserConfiguration#SPRING_EXPRESSION_COMPILER_MODE_PROPERTY_NAME diff --git a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java index 8149efb3af..e6335987df 100644 --- a/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java +++ b/spring-jdbc/src/main/java/org/springframework/jdbc/datasource/DriverManagerDataSource.java @@ -48,9 +48,9 @@ import org.springframework.util.ClassUtils; * the container. Such a DataSource can be exposed as a DataSource bean in a Spring * ApplicationContext via {@link org.springframework.jndi.JndiObjectFactoryBean}, * for seamless switching to and from a local DataSource bean like this class. - * For tests, you can then either set up a mock JNDI environment through Spring's - * {@link org.springframework.mock.jndi.SimpleNamingContextBuilder}, or switch the - * bean definition to a local DataSource (which is simpler and thus recommended). + * For tests, you can then either set up a mock JNDI environment through complete + * solutions from third parties such as Simple-JNDI, + * or switch the bean definition to a local DataSource (which is simpler and thus recommended). * *

This {@code DriverManagerDataSource} class was originally designed alongside * Apache Commons DBCP diff --git a/spring-test/src/main/java/org/springframework/test/context/CacheAwareContextLoaderDelegate.java b/spring-test/src/main/java/org/springframework/test/context/CacheAwareContextLoaderDelegate.java index 0a5827713a..0cde8b93e6 100644 --- a/spring-test/src/main/java/org/springframework/test/context/CacheAwareContextLoaderDelegate.java +++ b/spring-test/src/main/java/org/springframework/test/context/CacheAwareContextLoaderDelegate.java @@ -81,7 +81,6 @@ public interface CacheAwareContextLoaderDelegate { * the application context * @see #isContextLoaded * @see #closeContext - * @see #setContextFailureProcessor */ ApplicationContext loadContext(MergedContextConfiguration mergedContextConfiguration); diff --git a/spring-test/src/main/java/org/springframework/test/context/TestContextAnnotationUtils.java b/spring-test/src/main/java/org/springframework/test/context/TestContextAnnotationUtils.java index 3ac913d5f7..4f695e1b6f 100644 --- a/spring-test/src/main/java/org/springframework/test/context/TestContextAnnotationUtils.java +++ b/spring-test/src/main/java/org/springframework/test/context/TestContextAnnotationUtils.java @@ -66,7 +66,7 @@ import org.springframework.util.ObjectUtils; * example, {@link ContextConfiguration#inheritLocations}. * * @author Sam Brannen - * @since 5.3, though originally since 4.0 as {@link org.springframework.test.util.MetaAnnotationUtils} + * @since 5.3, though originally since 4.0 as {@code org.springframework.test.util.MetaAnnotationUtils} * @see AnnotationUtils * @see AnnotatedElementUtils * @see AnnotationDescriptor diff --git a/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestContextBootstrapper.java b/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestContextBootstrapper.java index ba0855ff5d..b03d224ddf 100644 --- a/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestContextBootstrapper.java +++ b/spring-test/src/main/java/org/springframework/test/context/support/AbstractTestContextBootstrapper.java @@ -494,13 +494,13 @@ public abstract class AbstractTestContextBootstrapper implements TestContextBoot * interaction with the {@code ContextCache}. *

The default implementation delegates to * {@code getBootstrapContext().getCacheAwareContextLoaderDelegate()} and - * supplies the returned delegate the configured - * {@link #getApplicationContextFailureProcessor() ApplicationContextFailureProcessor}. + * the default one will load {@link org.springframework.test.context.ApplicationContextFailureProcessor} + * via the service loading mechanism. *

Concrete subclasses may choose to override this method to return a custom * {@code CacheAwareContextLoaderDelegate} implementation with custom * {@link org.springframework.test.context.cache.ContextCache ContextCache} support. * @return the context loader delegate (never {@code null}) - * @see #getApplicationContextFailureProcessor() + * @see org.springframework.test.context.ApplicationContextFailureProcessor */ protected CacheAwareContextLoaderDelegate getCacheAwareContextLoaderDelegate() { return getBootstrapContext().getCacheAwareContextLoaderDelegate(); diff --git a/spring-test/src/main/java/org/springframework/test/util/TestSocketUtils.java b/spring-test/src/main/java/org/springframework/test/util/TestSocketUtils.java index dbf8e477fe..9c192b7103 100644 --- a/spring-test/src/main/java/org/springframework/test/util/TestSocketUtils.java +++ b/spring-test/src/main/java/org/springframework/test/util/TestSocketUtils.java @@ -28,7 +28,7 @@ import org.springframework.util.Assert; * Simple utility for finding available TCP ports on {@code localhost} for use in * integration testing scenarios. * - *

This is a limited form of {@link org.springframework.util.SocketUtils} which + *

This is a limited form of {@code org.springframework.util.SocketUtils}, which * has been deprecated since Spring Framework 5.3.16 and removed in Spring * Framework 6.0. * diff --git a/spring-test/src/main/java/org/springframework/test/web/client/AbstractRequestExpectationManager.java b/spring-test/src/main/java/org/springframework/test/web/client/AbstractRequestExpectationManager.java index 99658b13a8..654ff3e610 100644 --- a/spring-test/src/main/java/org/springframework/test/web/client/AbstractRequestExpectationManager.java +++ b/spring-test/src/main/java/org/springframework/test/web/client/AbstractRequestExpectationManager.java @@ -110,7 +110,7 @@ public abstract class AbstractRequestExpectationManager implements RequestExpect /** * As of 5.0.3 subclasses should implement this method instead of - * {@link #validateRequestInternal(ClientHttpRequest)} in order to match the + * {@code #validateRequestInternal(ClientHttpRequest)} in order to match the * request to an expectation, leaving the call to create the response as a separate step * (to be invoked by this class). * @param request the current request diff --git a/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java b/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java index 5982d8bfab..15e166f021 100644 --- a/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java +++ b/spring-tx/src/main/java/org/springframework/transaction/annotation/Isolation.java @@ -70,7 +70,7 @@ public enum Isolation { /** * A constant indicating that dirty reads, non-repeatable reads, and phantom * reads are prevented. - *

This level includes the prohibitions in {@link #ISOLATION_REPEATABLE_READ} + *

This level includes the prohibitions in {@link #REPEATABLE_READ} * and further prohibits the situation where one transaction reads all rows that * satisfy a {@code WHERE} condition, a second transaction inserts a row * that satisfies that {@code WHERE} condition, and the first transaction diff --git a/spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java b/spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java index e2d59b6347..1a1a1c52cb 100644 --- a/spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java +++ b/spring-web/src/main/java/org/springframework/http/client/support/HttpAccessor.java @@ -66,7 +66,7 @@ public abstract class HttpAccessor { * Configure the Apache HttpComponents or OkHttp request factory to enable PATCH. * @see #createRequest(URI, HttpMethod) * @see SimpleClientHttpRequestFactory - * @see org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory + * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory */ public void setRequestFactory(ClientHttpRequestFactory requestFactory) { diff --git a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java index f25c4f2f89..d342059805 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java @@ -383,7 +383,7 @@ public interface RestOperations { * @since 4.3.5 * @see HttpEntity * @see RestTemplate#setRequestFactory - * @see org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory + * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory */ @Nullable @@ -406,7 +406,7 @@ public interface RestOperations { * @since 4.3.5 * @see HttpEntity * @see RestTemplate#setRequestFactory - * @see org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory + * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory */ @Nullable @@ -427,7 +427,7 @@ public interface RestOperations { * @since 4.3.5 * @see HttpEntity * @see RestTemplate#setRequestFactory - * @see org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory + * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory */ @Nullable