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

@@ -29,7 +29,7 @@ import org.springframework.web.method.HandlerMethod;
* exits without invoking {@code postHandle} and {@code afterCompletion}, as it
* normally does, since the results of request handling (e.g. ModelAndView)
* will. be produced concurrently in another thread. In such scenarios,
* {@link #afterConcurrentHandlingStarted(HttpServletRequest, HttpServletResponse)}
* {@link #afterConcurrentHandlingStarted(HttpServletRequest, HttpServletResponse, Object)}
* is invoked instead allowing implementations to perform tasks such as cleaning
* up thread bound attributes.
*

View File

@@ -783,8 +783,6 @@ public abstract class FrameworkServlet extends HttpServletBean {
/**
* Override the parent class implementation in order to intercept PATCH
* requests.
*
* @see #doPatch(HttpServletRequest, HttpServletResponse)
*/
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)

View File

@@ -29,7 +29,7 @@ import org.springframework.web.accept.ContentNegotiationManagerFactoryBean;
* <p>By default strategies for checking the extension of the request path and
* the {@code Accept} header are registered. The path extension check will perform
* lookups through the {@link ServletContext} and the Java Activation Framework
* (if present) unless {@linkplain #setMediaTypes(Map) media types} are configured.
* (if present) unless {@linkplain #mediaTypes(Map) media types} are configured.
*
* @author Rossen Stoyanchev
* @since 3.2
@@ -97,7 +97,7 @@ public class ContentNegotiationConfigurer {
* {@link #favorPathExtension(boolean)} is set to {@code true}.
* <p>The default value is {@code true}.
* @see #parameterName
* @see #setMediaTypes(Map)
* @see #mediaTypes(Map)
*/
public ContentNegotiationConfigurer useJaf(boolean useJaf) {
this.factoryBean.setUseJaf(useJaf);
@@ -112,7 +112,7 @@ public class ContentNegotiationConfigurer {
* for {@code /hotels?format=pdf} will be interpreted as a request for
* {@code "application/pdf"} regardless of the {@code Accept} header.
* <p>To use this option effectively you must also configure the MediaType
* type mappings via {@link #setMediaTypes(Map)}.
* type mappings via {@link #mediaTypes(Map)}.
* @see #parameterName(String)
*/
public ContentNegotiationConfigurer favorParameter(boolean favorParameter) {
@@ -122,7 +122,7 @@ public class ContentNegotiationConfigurer {
/**
* Set the parameter name that can be used to determine the requested media type
* if the {@link #setFavorParameter} property is {@code true}.
* if the {@link #favorParameter(boolean)} property is {@code true}.
* <p>The default parameter name is {@code "format"}.
*/
public ContentNegotiationConfigurer parameterName(String parameterName) {

View File

@@ -48,7 +48,8 @@ public final class MappedInterceptor {
/**
* Create a new MappedInterceptor instance.
* @param pathPatterns the path patterns to map with a {@code null} value matching to all paths
* @param includePatterns the path patterns to map with a {@code null} value matching to all paths
* @param excludePatterns the path patterns to exclude
* @param interceptor the HandlerInterceptor instance to map to the given patterns
*/
public MappedInterceptor(String[] includePatterns, String[] excludePatterns, HandlerInterceptor interceptor) {

View File

@@ -76,7 +76,7 @@ public final class ProducesRequestCondition extends AbstractRequestCondition<Pro
* accepting a {@link ContentNegotiationManager}.
* @param produces expressions with syntax defined by {@link RequestMapping#produces()}
* @param headers expressions with syntax defined by {@link RequestMapping#headers()}
* @param contentNegotiationManager used to determine requested media types
* @param manager used to determine requested media types
*/
public ProducesRequestCondition(String[] produces, String[] headers,
ContentNegotiationManager manager) {

View File

@@ -1,10 +1,9 @@
/**
*
* MVC infrastructure for annotation-based handler method processing,
* building on the <code>org.springframework.web.method.annotation</code> package.
* Entry points are {@link RequestMappingHandlerMapping} and {@link RequestMappingHandlerAdapter}.
*
* Entry points are {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping}
* and {@link org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter}.
*/
package org.springframework.web.servlet.mvc.method.annotation;

View File

@@ -10,9 +10,9 @@
* <p>
* A <code>Controller</code> - as defined in this package - is analogous to a Struts
* <code>Action</code>. Usually <code>Controllers</code> are JavaBeans
* to allow easy configuration using the {@link org.springframework.beans org.springframework.beans}
* package. Controllers define the <code>C</code> from so-called MVC paradigm
* and can be used in conjunction with the {@link org.springframework.web.servlet.ModelAndView ModelAndView}
* to allow easy configuration. Controllers define the <code>C</code> from so-called
* MVC paradigm and can be used in conjunction with the
* {@link org.springframework.web.servlet.ModelAndView ModelAndView}
* to achieve interactive applications. The view might be represented by a
* HTML interface, but, because of model and the controller being completely
* independent of the view, PDF views are possible, as well as for instance Excel

View File

@@ -71,7 +71,7 @@ import org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMeth
* @see #handleHttpMessageNotWritable
* @see #handleMethodArgumentNotValidException
* @see #handleMissingServletRequestParameter
* @see #handleMissingServletRequestPart
* @see #handleMissingServletRequestPartException
* @see #handleBindException
*/
public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionResolver {

View File

@@ -137,7 +137,7 @@ public abstract class AbstractDispatcherServletInitializer
* Specify filters to add and also map to the {@code DispatcherServlet}.
*
* @return an array of filters or {@code null}
* @see #registerServletFilters(ServletContext, String, Filter...)
* @see #registerServletFilter(ServletContext, Filter)
*/
protected Filter[] getServletFilters() {
return null;
@@ -158,8 +158,7 @@ public abstract class AbstractDispatcherServletInitializer
* filters directly with the {@code ServletContext}.
*
* @param servletContext the servlet context to register filters with
* @param servletName the name of the servlet to map the filters to
* @param filters the filters to be registered
* @param filter the filter to be registered
* @return the filter registration
*/
protected FilterRegistration.Dynamic registerServletFilter(ServletContext servletContext, Filter filter) {

View File

@@ -297,11 +297,6 @@ public class ContentNegotiatingViewResolver extends WebApplicationObjectSupport
/**
* Determines the list of {@link MediaType} for the given {@link HttpServletRequest}.
* <p>The default implementation invokes {@link #getMediaTypeFromFilename(String)} if {@linkplain
* #setFavorPathExtension favorPathExtension} property is <code>true</code>. If the property is
* <code>false</code>, or when a media type cannot be determined from the request path,
* this method will inspect the {@code Accept} header of the request.
* <p>This method can be overridden to provide a different algorithm.
* @param request the current servlet request
* @return the list of media types requested, if any
*/