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

@@ -45,7 +45,6 @@ public class XmlExpectationsHelper {
/**
* Parse the content as {@link Node} and apply a {@link Matcher}.
* @see org.hamcrest.Matchers#hasXPath
*/
public void assertNode(String content, Matcher<? super Node> matcher) throws Exception {
Document document = parseXmlString(content);

View File

@@ -56,7 +56,7 @@ public abstract class MockRestResponseCreators {
/**
* {@code ResponseCreator} for a 200 response (OK) with byte[] body.
* @param body the response body
* @param mediaType the type of the content, may be {@code null}
* @param contentType the type of the content, may be {@code null}
*/
public static DefaultResponseCreator withSuccess(byte[] body, MediaType contentType) {
return new DefaultResponseCreator(HttpStatus.OK).body(body).contentType(contentType);
@@ -65,7 +65,7 @@ public abstract class MockRestResponseCreators {
/**
* {@code ResponseCreator} for a 200 response (OK) content with {@link Resource}-based body.
* @param body the response body
* @param mediaType the type of the content, may be {@code null}
* @param contentType the type of the content, may be {@code null}
*/
public static DefaultResponseCreator withSuccess(Resource body, MediaType contentType) {
return new DefaultResponseCreator(HttpStatus.OK).body(body).contentType(contentType);

View File

@@ -40,7 +40,7 @@ public interface ResultMatcher {
/**
* Assert the result of an executed request.
*
* @param mvcResult the result of the executed request
* @param result the result of the executed request
* @throws Exception if a failure occurs
*/
void match(MvcResult result) throws Exception;

View File

@@ -87,8 +87,8 @@ public abstract class MockMvcRequestBuilders {
* @param urlTemplate a URL template; the resulting URL will be encoded
* @param urlVariables zero or more URL variables
*/
public static MockHttpServletRequestBuilder request(HttpMethod httpMethod, String urlTemplate, Object... urlVars) {
return new MockHttpServletRequestBuilder(httpMethod, urlTemplate, urlVars);
public static MockHttpServletRequestBuilder request(HttpMethod httpMethod, String urlTemplate, Object... urlVariables) {
return new MockHttpServletRequestBuilder(httpMethod, urlTemplate, urlVariables);
}
/**

View File

@@ -147,8 +147,6 @@ public class ContentResultMatchers {
/**
* Parse the response content as {@link Node} and apply the given Hamcrest
* {@link Matcher}.
*
* @see org.hamcrest.Matchers#hasXPath
*/
public ResultMatcher node(final Matcher<? super Node> matcher) {
return new ResultMatcher() {

View File

@@ -25,7 +25,7 @@ import org.springframework.test.web.servlet.ResultMatcher;
* Factory for assertions on the response content using <a
* href="http://goessner.net/articles/JsonPath/">JSONPath</a> expressions.
* An instance of this class is typically accessed via
* {@link MockMvcResultMatchers#jsonPpath}.
* {@link MockMvcResultMatchers#jsonPath}.
*
* @author Rossen Stoyanchev
* @since 3.2

View File

@@ -56,8 +56,8 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
/**
* Protected constructor. Not intended for direct instantiation.
* @see MockMvcBuilders#webAppContextSetup(WebApplicationContext)
* Protected constructor. Not intended for direct instantiation.
* @see MockMvcBuilders#webAppContextSetup(WebApplicationContext)
*/
protected DefaultMockMvcBuilder(WebApplicationContext webAppContext) {
Assert.notNull(webAppContext, "WebApplicationContext is required");
@@ -116,7 +116,6 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
*
* @param filter the filter to add
* @param urlPatterns URL patterns to map to; if empty, "/*" is used by default
* @return
*/
@SuppressWarnings("unchecked")
public final <T extends Self> T addFilter(Filter filter, String... urlPatterns) {