General polish of new 4.0 classes
Apply consistent styling to new classes introduced in Spring 4.0. - Javadoc line wrapping, whitespace and formatting - General code whitespace - Consistent Assert.notNull messages
This commit is contained in:
@@ -58,7 +58,6 @@ abstract class AbstractAsyncClientHttpRequest implements AsyncClientHttpRequest
|
||||
|
||||
/**
|
||||
* Asserts that this request has not been {@linkplain #executeAsync() executed} yet.
|
||||
*
|
||||
* @throws IllegalStateException if this request has been executed
|
||||
*/
|
||||
protected void assertNotExecuted() {
|
||||
|
||||
@@ -37,7 +37,6 @@ public interface AsyncClientHttpRequest extends HttpRequest, HttpOutputMessage {
|
||||
/**
|
||||
* Execute this request asynchronously, resulting in a future
|
||||
* {@link ClientHttpResponse} that can be read.
|
||||
*
|
||||
* @return the future response result of the execution
|
||||
* @throws java.io.IOException in case of I/O errors
|
||||
*/
|
||||
|
||||
@@ -35,7 +35,6 @@ public interface AsyncClientHttpRequestFactory {
|
||||
* HTTP method.
|
||||
* <p>The returned request can be written to, and then executed by calling
|
||||
* {@link AsyncClientHttpRequest#executeAsync()}.
|
||||
*
|
||||
* @param uri the URI to create a request for
|
||||
* @param httpMethod the HTTP method to execute
|
||||
* @return the created request
|
||||
|
||||
@@ -36,7 +36,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Asynchronous extension of the {@link HttpComponentsClientHttpRequestFactory}. Uses
|
||||
* <a href="http://hc.apache.org/httpcomponents-asyncclient-dev/">Apache HttpComponents
|
||||
* <a href="http://hc.apache.org/httpcomponents-asyncclient-dev/">Apache HttpComponents
|
||||
* HttpAsyncClient 4.0</a> to create requests.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
|
||||
@@ -39,11 +39,11 @@ import org.springframework.http.StreamingHttpOutputMessage;
|
||||
* {@link ClientHttpRequest} implementation that uses Apache HttpComponents HttpClient to
|
||||
* execute requests.
|
||||
*
|
||||
* <p>Created via the {@link org.springframework.http.client.HttpComponentsClientHttpRequestFactory}.
|
||||
* <p>Created via the
|
||||
* {@link org.springframework.http.client.HttpComponentsClientHttpRequestFactory}.
|
||||
*
|
||||
* @author Arjen Poutsma
|
||||
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory#createRequest(java.net.URI,
|
||||
* org.springframework.http.HttpMethod)
|
||||
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory#createRequest(java.net.URI, org.springframework.http.HttpMethod)
|
||||
* @since 4.0
|
||||
*/
|
||||
final class HttpComponentsStreamingClientHttpRequest extends AbstractClientHttpRequest
|
||||
|
||||
@@ -65,7 +65,6 @@ public class AsyncHttpAccessor {
|
||||
/**
|
||||
* Create a new {@link AsyncClientHttpRequest} via this template's {@link
|
||||
* AsyncClientHttpRequestFactory}.
|
||||
*
|
||||
* @param url the URL to connect to
|
||||
* @param method the HTTP method to execute (GET, POST, etc.)
|
||||
* @return the created request
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package org.springframework.http.server;
|
||||
|
||||
|
||||
/**
|
||||
* A control that can put the processing of an HTTP request in asynchronous mode during
|
||||
* which the response remains open until explicitly closed.
|
||||
|
||||
@@ -27,7 +27,6 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
|
||||
/**
|
||||
* A {@link ServerHttpAsyncRequestControl} to use on Servlet containers (Servlet 3.0+).
|
||||
*
|
||||
|
||||
@@ -63,7 +63,6 @@ public @interface ControllerAdvice {
|
||||
* Allows for more concise annotation declarations e.g.:
|
||||
* {@code @ControllerAdvice("org.my.pkg")} is equivalent to
|
||||
* {@code @ControllerAdvice(basePackages="org.my.pkg")}.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
String[] value() default {};
|
||||
@@ -73,11 +72,9 @@ public @interface ControllerAdvice {
|
||||
* Controllers that belong to those base packages will be included, e.g.:
|
||||
* {@code @ControllerAdvice(basePackages="org.my.pkg")} or
|
||||
* {@code @ControllerAdvice(basePackages={"org.my.pkg","org.my.other.pkg"})}
|
||||
*
|
||||
* <p>{@link #value()} is an alias for this attribute.
|
||||
* <p>Also consider using {@link #basePackageClasses()} as a type-safe
|
||||
* alternative to String-based package names.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
String[] basePackages() default {};
|
||||
@@ -86,10 +83,8 @@ public @interface ControllerAdvice {
|
||||
* Type-safe alternative to {@link #value()} for specifying the packages
|
||||
* to select Controllers to be assisted by the {@code @ControllerAdvice}
|
||||
* annotated class.
|
||||
*
|
||||
* <p>Consider creating a special no-op marker class or interface in each package
|
||||
* that serves no purpose other than being referenced by this attribute.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
Class<?>[] basePackageClasses() default {};
|
||||
@@ -98,7 +93,6 @@ public @interface ControllerAdvice {
|
||||
* Array of classes.
|
||||
* Controllers that are assignable to at least one of the given types
|
||||
* will be assisted by the {@code @ControllerAdvice} annotated class.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
Class<?>[] assignableTypes() default {};
|
||||
|
||||
@@ -188,7 +188,6 @@ public class ControllerAdviceBean implements Ordered {
|
||||
/**
|
||||
* Checks whether the given bean type should be assisted by this
|
||||
* {@code @ControllerAdvice} instance.
|
||||
*
|
||||
* @param beanType the type of the bean to check
|
||||
* @see org.springframework.web.bind.annotation.ControllerAdvice
|
||||
* @since 4.0
|
||||
|
||||
@@ -48,7 +48,6 @@ public class CompositeUriComponentsContributor implements UriComponentsContribut
|
||||
* by the same class, the most convenient option is to obtain the configured
|
||||
* {@code HandlerMethodArgumentResolvers} in {@code RequestMappingHandlerAdapter} and
|
||||
* provide that to this constructor.
|
||||
*
|
||||
* @param contributors a collection of {@link UriComponentsContributor}
|
||||
* or {@link HandlerMethodArgumentResolver}s.
|
||||
*/
|
||||
@@ -62,15 +61,13 @@ public class CompositeUriComponentsContributor implements UriComponentsContribut
|
||||
* by the same class, the most convenient option is to obtain the configured
|
||||
* {@code HandlerMethodArgumentResolvers} in the {@code RequestMappingHandlerAdapter}
|
||||
* and provide that to this constructor.
|
||||
* <p>
|
||||
* If the {@link ConversionService} argument is {@code null},
|
||||
* <p>If the {@link ConversionService} argument is {@code null},
|
||||
* {@link org.springframework.format.support.DefaultFormattingConversionService}
|
||||
* will be used by default.
|
||||
*
|
||||
* @param contributors a collection of {@link UriComponentsContributor}
|
||||
* or {@link HandlerMethodArgumentResolver}s.
|
||||
* or {@link HandlerMethodArgumentResolver}s.
|
||||
* @param conversionService a ConversionService to use when method argument values
|
||||
* need to be formatted as Strings before being added to the URI
|
||||
* need to be formatted as Strings before being added to the URI
|
||||
*/
|
||||
public CompositeUriComponentsContributor(Collection<?> contributors, ConversionService conversionService) {
|
||||
|
||||
|
||||
@@ -43,7 +43,6 @@ public interface UriComponentsContributor {
|
||||
* Process the given method argument and either update the
|
||||
* {@link UriComponentsBuilder} or add to the map with URI variables to use to
|
||||
* expand the URI after all arguments are processed.
|
||||
*
|
||||
* @param parameter the controller method parameter, never {@literal null}.
|
||||
* @param value the argument value, possibly {@literal null}.
|
||||
* @param builder the builder to update, never {@literal null}.
|
||||
|
||||
Reference in New Issue
Block a user