Eliminate all Javadoc warnings

- Support external Javadoc links using Gradle's javadoc.options.links

 - Fix all other Javadoc warnings, such as typos, references to
   non-existent (or no longer existent) types and members, etc,
   including changes related to the Quartz 2.0 upgrade (SPR-8275) and
   adding the HTTP PATCH method (SPR-7985).

 - Suppress all output for project-level `javadoc` tasks in order to
   hide false-negative warnings about cross-module @see and @link
   references (e.g. spring-core having a @see reference to spring-web).
   Use the `--info` (-i) flag to gradle at any time to see project-level
   javadoc warnings without running the entire `api` task. e.g.
   `gradle :spring-core:javadoc -i`

 - Favor root project level `api` task for detection of legitimate
   Javadoc warnings. There are now zero Javadoc warnings across the
   entirety of spring-framework. Goal: keep it that way.

 - Remove all @link and @see references to types and members that exist
   only in Servlet <= 2.5 and Hibernate <= 4.0, favoring 3.0+ and 4.0+
   respectively. This is necessary because only one version of each of
   these dependencies can be present on the global `api` javadoc task's
   classpath. To that end, the `api` task classpath has now been
   customized to ensure that the Servlet 3 API and Hibernate Core 4 jars
   have precedence.

 - SPR-8896 replaced our dependency on aspectjrt with a dependency on
   aspectjweaver, which is fine from a POM point of view, but causes
   a spurious warning to be emitted from the ant iajc task that it
   "cannot find aspectjrt on the classpath" - even though aspectjweaver
   is perfectly sufficient. In the name of keeping the console quiet, a
   new `rt` configuration has been added, and aspectjrt added as a
   dependency to it. In turn, configurations.rt.asPath is appended to
   the iajc classpath during both compileJava and compileTestJava for
   spring-aspects.

Issue: SPR-10078, SPR-8275, SPR-7985, SPR-8896
This commit is contained in:
Chris Beams
2012-12-11 11:56:38 +01:00
parent 8f90b487e2
commit f26534700a
72 changed files with 217 additions and 221 deletions

View File

@@ -51,7 +51,7 @@ public class MockEnvironment extends AbstractEnvironment {
* Convenient synonym for {@link #setProperty} that returns the current instance.
* Useful for method chaining and fluent-style use.
* @return this {@link MockEnvironment} instance
* @see MockPropertySource#withProperty(String, String)
* @see MockPropertySource#withProperty
*/
public MockEnvironment withProperty(String key, String value) {
this.setProperty(key, value);

View File

@@ -159,7 +159,7 @@ public class MockServletContext implements ServletContext {
* Create a new MockServletContext using the supplied resource base path and
* resource loader.
* <p>Registers a {@link MockRequestDispatcher} for the Servlet named
* {@value #COMMON_DEFAULT_SERVLET_NAME}.
* {@linkplain #COMMON_DEFAULT_SERVLET_NAME "default"}.
* @param resourceBasePath the root directory of the WAR (should not end with a slash)
* @param resourceLoader the ResourceLoader to use (or null for the default)
* @see #registerNamedDispatcher
@@ -342,7 +342,7 @@ public class MockServletContext implements ServletContext {
/**
* Get the name of the <em>default</em> {@code Servlet}.
* <p>Defaults to {@value #COMMON_DEFAULT_SERVLET_NAME}.
* <p>Defaults to {@linkplain #COMMON_DEFAULT_SERVLET_NAME "default"}.
* @see #setDefaultServletName
*/
public String getDefaultServletName() {

View File

@@ -76,7 +76,7 @@ package org.springframework.test;
*
* Intended for use with JUnit 4 and TestNG (as of Spring 3.0).
* You might want to compare this class with the
* {@link junit.extensions.ExceptionTestCase} class.
* {@code junit.extensions.ExceptionTestCase} class.
*
* @author Rick Evans
* @author Juergen Hoeller

View File

@@ -124,7 +124,7 @@ public abstract class AbstractTransactionalJUnit4SpringContextTests extends Abst
/**
* Count the rows in the given table, using the provided {@code WHERE} clause.
* <p>See the Javadoc for {@link JdbcTestUtils#countRowsInTableWhere()} for details.
* <p>See the Javadoc for {@link JdbcTestUtils#countRowsInTableWhere} for details.
* @param tableName the name of the table to count rows in
* @param whereClause the {@code WHERE} clause to append to the query
* @return the number of rows in the table that match the provided

View File

@@ -133,7 +133,7 @@ public abstract class AbstractGenericContextLoader extends AbstractContextLoader
*
* <p><b>Note</b>: this method does not provide a means to set active bean definition
* profiles for the loaded context. See {@link #loadContext(MergedContextConfiguration)}
* and {@link #prepareContext(GenericApplicationContext, MergedContextConfiguration)}
* and {@link AbstractContextLoader#prepareContext(ConfigurableApplicationContext, MergedContextConfiguration)}
* for an alternative.
*
* @return a new application context

View File

@@ -155,7 +155,7 @@ public class AnnotationConfigContextLoader extends AbstractGenericContextLoader
* {@link AnnotatedBeanDefinitionReader} is used to register the appropriate
* bean definitions.
*
* <p>Note that this method does not call {@link #createBeanDefinitionReader()}
* <p>Note that this method does not call {@link #createBeanDefinitionReader}
* since <code>AnnotatedBeanDefinitionReader</code> is not an instance of
* {@link BeanDefinitionReader}.
*

View File

@@ -115,7 +115,7 @@ public abstract class AbstractTransactionalTestNGSpringContextTests extends Abst
/**
* Count the rows in the given table, using the provided {@code WHERE} clause.
* <p>See the Javadoc for {@link JdbcTestUtils#countRowsInTableWhere()} for details.
* <p>See the Javadoc for {@link JdbcTestUtils#countRowsInTableWhere} for details.
* @param tableName the name of the table to count rows in
* @param whereClause the {@code WHERE} clause to append to the query
* @return the number of rows in the table that match the provided

View File

@@ -49,7 +49,7 @@ import org.springframework.web.context.support.GenericWebApplicationContext;
* {@link org.springframework.test.context.ContextLoader ContextLoader} SPI.
*
* <p>Concrete subclasses must provide an appropriate implementation of
* {@link #loadBeanDefinitions()}.
* {@link #loadBeanDefinitions}.
*
* @author Sam Brannen
* @since 3.2
@@ -71,18 +71,18 @@ public abstract class AbstractGenericWebContextLoader extends AbstractContextLoa
*
* <ul>
* <li>Creates a {@link GenericWebApplicationContext} instance.</li>
* <li>Delegates to {@link #configureWebResources()} to create the
* <li>Delegates to {@link #configureWebResources} to create the
* {@link MockServletContext} and set it in the {@code WebApplicationContext}.</li>
* <li>Calls {@link #prepareContext()} to allow for customizing the context
* <li>Calls {@link #prepareContext} to allow for customizing the context
* before bean definitions are loaded.</li>
* <li>Calls {@link #customizeBeanFactory()} to allow for customizing the
* <li>Calls {@link #customizeBeanFactory} to allow for customizing the
* context's {@code DefaultListableBeanFactory}.</li>
* <li>Delegates to {@link #loadBeanDefinitions()} to populate the context
* <li>Delegates to {@link #loadBeanDefinitions} to populate the context
* from the locations or classes in the supplied {@code MergedContextConfiguration}.</li>
* <li>Delegates to {@link AnnotationConfigUtils} for
* {@linkplain AnnotationConfigUtils#registerAnnotationConfigProcessors registering}
* annotation configuration processors.</li>
* <li>Calls {@link #customizeContext()} to allow for customizing the context
* <li>Calls {@link #customizeContext} to allow for customizing the context
* before it is refreshed.</li>
* <li>{@link ConfigurableApplicationContext#refresh Refreshes} the
* context and registers a JVM shutdown hook for it.</li>

View File

@@ -30,8 +30,7 @@ public class GenericXmlWebContextLoader extends AbstractGenericWebContextLoader
/**
* Loads bean definitions using an {@link XmlBeanDefinitionReader}.
*
* @see AbstractGenericWebContextLoader#loadBeanDefinitions()
* @see AbstractGenericWebContextLoader#loadBeanDefinitions
*/
@Override
protected void loadBeanDefinitions(GenericWebApplicationContext context,