Fail Gradle build for Javadoc warnings
In order to catch Javadoc errors in the build, we now enable the `Xwerror` flag for the `javadoc` tool. In addition, we now use `Xdoclint:syntax` instead of `Xdoclint:none` in order to validate syntax within our Javadoc. This commit fixes all resulting Javadoc errors and warnings. This commit also upgrades to Undertow 2.2.12.Final and fixes the artifact names for exclusions for the Servlet and annotations APIs. The incorrect exclusion of the Servlet API resulted in the Servlet API being on the classpath twice for the javadoc task, which resulted in the following warnings in previous builds. javadoc: warning - Multiple sources of package comments found for package "javax.servlet" javadoc: warning - Multiple sources of package comments found for package "javax.servlet.http" javadoc: warning - Multiple sources of package comments found for package "javax.servlet.descriptor" javadoc: warning - Multiple sources of package comments found for package "javax.servlet.annotation" Closes gh-27480
This commit is contained in:
@@ -1268,7 +1268,7 @@ public class DispatcherServlet extends FrameworkServlet {
|
||||
}
|
||||
|
||||
/**
|
||||
* No handler found -> set appropriate HTTP response status.
|
||||
* No handler found → set appropriate HTTP response status.
|
||||
* @param request current HTTP request
|
||||
* @param response current HTTP response
|
||||
* @throws Exception if preparing the response failed
|
||||
|
||||
@@ -303,7 +303,7 @@ public class ModelAndView {
|
||||
|
||||
/**
|
||||
* Add all attributes contained in the provided Map to the model.
|
||||
* @param modelMap a Map of attributeName -> attributeValue pairs
|
||||
* @param modelMap a Map of attributeName → attributeValue pairs
|
||||
* @see ModelMap#addAllAttributes(Map)
|
||||
* @see #getModelMap()
|
||||
*/
|
||||
|
||||
@@ -582,7 +582,7 @@ public abstract class RouterFunctions {
|
||||
* <pre class="code">
|
||||
* RouterFunction<ServerResponse> nestedRoute =
|
||||
* RouterFunctions.route()
|
||||
* .nest(RequestPredicates.path("/user"), () ->
|
||||
* .nest(RequestPredicates.path("/user"), () ->
|
||||
* RouterFunctions.route()
|
||||
* .GET(this::listUsers)
|
||||
* .POST(this::createUser)
|
||||
@@ -607,7 +607,7 @@ public abstract class RouterFunctions {
|
||||
* <pre class="code">
|
||||
* RouterFunction<ServerResponse> nestedRoute =
|
||||
* RouterFunctions.route()
|
||||
* .nest(RequestPredicates.path("/user"), builder ->
|
||||
* .nest(RequestPredicates.path("/user"), builder ->
|
||||
* builder.GET(this::listUsers)
|
||||
* .POST(this::createUser))
|
||||
* .build();
|
||||
@@ -652,7 +652,7 @@ public abstract class RouterFunctions {
|
||||
* <pre class="code">
|
||||
* RouterFunction<ServerResponse> nestedRoute =
|
||||
* RouterFunctions.route()
|
||||
* .path("/user", builder ->
|
||||
* .path("/user", builder ->
|
||||
* builder.GET(this::listUsers)
|
||||
* .POST(this::createUser))
|
||||
* .build();
|
||||
@@ -674,7 +674,7 @@ public abstract class RouterFunctions {
|
||||
* RouterFunction<ServerResponse> filteredRoute =
|
||||
* RouterFunctions.route()
|
||||
* .GET("/user", this::listUsers)
|
||||
* .filter((request, next) -> {
|
||||
* .filter((request, next) -> {
|
||||
* // check for authentication headers
|
||||
* if (isAuthenticated(request)) {
|
||||
* return next.handle(request);
|
||||
@@ -700,7 +700,7 @@ public abstract class RouterFunctions {
|
||||
* RouterFunction<ServerResponse> filteredRoute =
|
||||
* RouterFunctions.route()
|
||||
* .GET("/user", this::listUsers)
|
||||
* .before(request -> {
|
||||
* .before(request -> {
|
||||
* log(request);
|
||||
* return request;
|
||||
* })
|
||||
@@ -721,7 +721,7 @@ public abstract class RouterFunctions {
|
||||
* RouterFunction<ServerResponse> filteredRoute =
|
||||
* RouterFunctions.route()
|
||||
* .GET("/user", this::listUsers)
|
||||
* .after((request, response) -> {
|
||||
* .after((request, response) -> {
|
||||
* log(response);
|
||||
* return response;
|
||||
* })
|
||||
@@ -741,8 +741,8 @@ public abstract class RouterFunctions {
|
||||
* RouterFunction<ServerResponse> filteredRoute =
|
||||
* RouterFunctions.route()
|
||||
* .GET("/user", this::listUsers)
|
||||
* .onError(e -> e instanceof IllegalStateException,
|
||||
* (e, request) -> ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).build())
|
||||
* .onError(e -> e instanceof IllegalStateException,
|
||||
* (e, request) -> ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).build())
|
||||
* .build();
|
||||
* </pre>
|
||||
* @param predicate the type of exception to filter
|
||||
@@ -762,7 +762,7 @@ public abstract class RouterFunctions {
|
||||
* RouterFunctions.route()
|
||||
* .GET("/user", this::listUsers)
|
||||
* .onError(IllegalStateException.class,
|
||||
* (e, request) -> ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).build())
|
||||
* (e, request) -> ServerResponse.status(HttpStatus.INTERNAL_SERVER_ERROR).build())
|
||||
* .build();
|
||||
* </pre>
|
||||
* @param exceptionType the type of exception to filter
|
||||
|
||||
@@ -259,7 +259,7 @@ public interface ServerRequest {
|
||||
* public ServerResponse myHandleMethod(ServerRequest request) {
|
||||
* Instant lastModified = // application-specific calculation
|
||||
* return request.checkNotModified(lastModified)
|
||||
* .orElseGet(() -> {
|
||||
* .orElseGet(() -> {
|
||||
* // further request processing, actually building content
|
||||
* return ServerResponse.ok().body(...);
|
||||
* });
|
||||
@@ -293,7 +293,7 @@ public interface ServerRequest {
|
||||
* public ServerResponse myHandleMethod(ServerRequest request) {
|
||||
* String eTag = // application-specific calculation
|
||||
* return request.checkNotModified(eTag)
|
||||
* .orElseGet(() -> {
|
||||
* .orElseGet(() -> {
|
||||
* // further request processing, actually building content
|
||||
* return ServerResponse.ok().body(...);
|
||||
* });
|
||||
@@ -330,7 +330,7 @@ public interface ServerRequest {
|
||||
* Instant lastModified = // application-specific calculation
|
||||
* String eTag = // application-specific calculation
|
||||
* return request.checkNotModified(lastModified, eTag)
|
||||
* .orElseGet(() -> {
|
||||
* .orElseGet(() -> {
|
||||
* // further request processing, actually building content
|
||||
* return ServerResponse.ok().body(...);
|
||||
* });
|
||||
|
||||
@@ -267,14 +267,14 @@ public interface ServerResponse {
|
||||
* <p>For example:
|
||||
* <pre class="code">
|
||||
* public ServerResponse handleSse(ServerRequest request) {
|
||||
* return ServerResponse.sse(sse -> sse.send("Hello World!"));
|
||||
* return ServerResponse.sse(sse -> sse.send("Hello World!"));
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* <p>or, to set both the id and event type:
|
||||
* <pre class="code">
|
||||
* public ServerResponse handleSse(ServerRequest request) {
|
||||
* return ServerResponse.sse(sse -> sse
|
||||
* return ServerResponse.sse(sse -> sse
|
||||
* .id("42)
|
||||
* .event("event")
|
||||
* .send("Hello World!"));
|
||||
@@ -296,14 +296,14 @@ public interface ServerResponse {
|
||||
* <p>For example:
|
||||
* <pre class="code">
|
||||
* public ServerResponse handleSse(ServerRequest request) {
|
||||
* return ServerResponse.sse(sse -> sse.send("Hello World!"));
|
||||
* return ServerResponse.sse(sse -> sse.send("Hello World!"));
|
||||
* }
|
||||
* </pre>
|
||||
*
|
||||
* <p>or, to set both the id and event type:
|
||||
* <pre class="code">
|
||||
* public ServerResponse handleSse(ServerRequest request) {
|
||||
* return ServerResponse.sse(sse -> sse
|
||||
* return ServerResponse.sse(sse -> sse
|
||||
* .id("42)
|
||||
* .event("event")
|
||||
* .send("Hello World!"));
|
||||
|
||||
@@ -61,7 +61,6 @@ import org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver;
|
||||
* <p>This exception resolver is enabled by default in the common Spring
|
||||
* {@link org.springframework.web.servlet.DispatcherServlet}.
|
||||
*
|
||||
* <p>
|
||||
* <table>
|
||||
* <caption>Supported Exceptions</caption>
|
||||
* <thead>
|
||||
|
||||
@@ -244,7 +244,7 @@ public abstract class WebContentGenerator extends WebApplicationObjectSupport {
|
||||
* <ul>
|
||||
* <li>seconds == -1 (default value): no generation cache-related headers</li>
|
||||
* <li>seconds == 0: "Cache-Control: no-store" will prevent caching</li>
|
||||
* <li>seconds > 0: "Cache-Control: max-age=seconds" will ask to cache content</li>
|
||||
* <li>seconds > 0: "Cache-Control: max-age=seconds" will ask to cache content</li>
|
||||
* </ul>
|
||||
* <p>For more specific needs, a custom {@link org.springframework.http.CacheControl}
|
||||
* should be used.
|
||||
|
||||
@@ -51,7 +51,7 @@ import org.springframework.web.util.WebUtils;
|
||||
* </bean></pre>
|
||||
*
|
||||
* Every view name returned from a handler will be translated to a JSP
|
||||
* resource (for example: "myView" -> "/WEB-INF/jsp/myView.jsp"), using
|
||||
* resource (for example: "myView" → "/WEB-INF/jsp/myView.jsp"), using
|
||||
* this view class by default.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
|
||||
@@ -47,7 +47,7 @@ import org.springframework.web.servlet.support.RequestContext;
|
||||
* </bean></pre>
|
||||
*
|
||||
* Every view name returned from a handler will be translated to a JSP
|
||||
* resource (for example: "myView" -> "/WEB-INF/jsp/myView.jsp"), using
|
||||
* resource (for example: "myView" → "/WEB-INF/jsp/myView.jsp"), using
|
||||
* this view class to enable explicit JSTL support.
|
||||
*
|
||||
* <p>The specified MessageSource loads messages from "messages.properties" etc
|
||||
|
||||
@@ -49,7 +49,7 @@ import org.springframework.web.servlet.View;
|
||||
* specified prefix and/or suffix. Exporting an attribute that holds the
|
||||
* RequestContext to all views is explicitly supported.
|
||||
*
|
||||
* <p>Example: prefix="/WEB-INF/jsp/", suffix=".jsp", viewname="test" ->
|
||||
* <p>Example: prefix="/WEB-INF/jsp/", suffix=".jsp", viewname="test" →
|
||||
* "/WEB-INF/jsp/test.jsp"
|
||||
*
|
||||
* <p>As a special feature, redirect URLs can be specified via the "redirect:"
|
||||
@@ -342,14 +342,16 @@ public class UrlBasedViewResolver extends AbstractCachingViewResolver implements
|
||||
}
|
||||
|
||||
/**
|
||||
* Specify whether views resolved by this resolver should add path variables to the model or not.
|
||||
* <p>>The default setting is to let each View decide (see {@link AbstractView#setExposePathVariables}.
|
||||
* However, you can use this property to override that.
|
||||
* Specify whether views resolved by this resolver should add path
|
||||
* variables to the model or not.
|
||||
* <p>The default setting is to let each View decide
|
||||
* (see {@link AbstractView#setExposePathVariables}). However, you
|
||||
* can use this property to override that.
|
||||
* @param exposePathVariables
|
||||
* <ul>
|
||||
* <li>{@code true} - all Views resolved by this resolver will expose path variables
|
||||
* <li>{@code false} - no Views resolved by this resolver will expose path variables
|
||||
* <li>{@code null} - individual Views can decide for themselves (this is used by the default)
|
||||
* <li>{@code null} - individual Views can decide for themselves (this is used by default)
|
||||
* </ul>
|
||||
* @see AbstractView#setExposePathVariables
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,7 @@ import com.rometools.rome.feed.atom.Feed;
|
||||
* Abstract superclass for Atom Feed views, using the
|
||||
* <a href="https://github.com/rometools/rome">ROME</a> package.
|
||||
*
|
||||
* <p>><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
|
||||
* <p><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
|
||||
* variant of ROME, version 1.5. Please upgrade your build dependency.</b>
|
||||
*
|
||||
* <p>Application-specific view classes will extend this class.
|
||||
|
||||
@@ -33,7 +33,7 @@ import org.springframework.web.servlet.view.AbstractView;
|
||||
* Abstract base class for Atom and RSS Feed views, using the
|
||||
* <a href="https://github.com/rometools/rome">ROME</a> package.
|
||||
*
|
||||
* <p>><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
|
||||
* <p><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
|
||||
* variant of ROME, version 1.5. Please upgrade your build dependency.</b>
|
||||
*
|
||||
* <p>Application-specific view classes will typically extend from either
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.http.MediaType;
|
||||
* Abstract superclass for RSS Feed views, using the
|
||||
* <a href="https://github.com/rometools/rome">ROME</a> package.
|
||||
*
|
||||
* <p>><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
|
||||
* <p><b>NOTE: As of Spring 4.1, this is based on the {@code com.rometools}
|
||||
* variant of ROME, version 1.5. Please upgrade your build dependency.</b>
|
||||
*
|
||||
* <p>Application-specific view classes will extend this class.
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.web.context.ServletContextAware;
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
|
||||
* <property name="templateLoaderPath"><value>/WEB-INF/freemarker/</value></property>
|
||||
* <property name="templateLoaderPath"><value>/WEB-INF/freemarker/</value></property>
|
||||
* </bean></pre>
|
||||
*
|
||||
* This bean must be included in the application context of any application
|
||||
|
||||
@@ -88,17 +88,17 @@ import org.springframework.web.context.ServletContextAware;
|
||||
* <p>A typical TilesConfigurer bean definition looks as follows:
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
|
||||
* <property name="definitions">
|
||||
* <list>
|
||||
* <value>/WEB-INF/defs/general.xml</value>
|
||||
* <value>/WEB-INF/defs/widgets.xml</value>
|
||||
* <value>/WEB-INF/defs/administrator.xml</value>
|
||||
* <value>/WEB-INF/defs/customer.xml</value>
|
||||
* <value>/WEB-INF/defs/templates.xml</value>
|
||||
* </list>
|
||||
* </property>
|
||||
* </bean>
|
||||
* <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
|
||||
* <property name="definitions">
|
||||
* <list>
|
||||
* <value>/WEB-INF/defs/general.xml</value>
|
||||
* <value>/WEB-INF/defs/widgets.xml</value>
|
||||
* <value>/WEB-INF/defs/administrator.xml</value>
|
||||
* <value>/WEB-INF/defs/customer.xml</value>
|
||||
* <value>/WEB-INF/defs/templates.xml</value>
|
||||
* </list>
|
||||
* </property>
|
||||
* </bean>
|
||||
* </pre>
|
||||
*
|
||||
* The values in the list are the actual Tiles XML files containing the definitions.
|
||||
@@ -108,14 +108,14 @@ import org.springframework.web.context.ServletContextAware;
|
||||
* definitions is used to indicate locale information, for example:
|
||||
*
|
||||
* <pre class="code">
|
||||
* <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
|
||||
* <property name="definitions">
|
||||
* <list>
|
||||
* <value>/WEB-INF/defs/tiles.xml</value>
|
||||
* <value>/WEB-INF/defs/tiles_fr_FR.xml</value>
|
||||
* </list>
|
||||
* </property>
|
||||
* </bean>
|
||||
* <bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer">
|
||||
* <property name="definitions">
|
||||
* <list>
|
||||
* <value>/WEB-INF/defs/tiles.xml</value>
|
||||
* <value>/WEB-INF/defs/tiles_fr_FR.xml</value>
|
||||
* </list>
|
||||
* </property>
|
||||
* </bean>
|
||||
* </pre>
|
||||
*
|
||||
* @author mick semb wever
|
||||
|
||||
Reference in New Issue
Block a user