Checkstyle changes
* Upgrade to Checkstyle 9.0 * apply some JavaDocs rules * Fix JavaDocs rules violations * Some other minor clean up in the affected classes
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2017-2019 the original author or authors.
|
||||
* Copyright 2017-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -41,6 +41,9 @@ import org.springframework.validation.Validator;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
|
||||
/**
|
||||
* @param <S> the target spec extension type.
|
||||
* @param <E> the target endpoint type.
|
||||
*
|
||||
* @author Artem Bilan
|
||||
* @author Gary Russell
|
||||
*
|
||||
@@ -68,7 +71,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a {@link Consumer} for configuring {@link RequestMapping} via {@link RequestMappingSpec}
|
||||
* Provide a {@link Consumer} for configuring {@link RequestMapping} via {@link RequestMappingSpec}.
|
||||
* @param mapping the {@link Consumer} to configure {@link RequestMappingSpec}.
|
||||
* @return the spec
|
||||
* @see RequestMapping
|
||||
@@ -79,7 +82,7 @@ public abstract class HttpInboundEndpointSupportSpec<S extends HttpInboundEndpoi
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide a {@link Consumer} for configuring {@link CrossOrigin} via {@link CrossOriginSpec}
|
||||
* Provide a {@link Consumer} for configuring {@link CrossOrigin} via {@link CrossOriginSpec}.
|
||||
* @param crossOrigin the {@link Consumer} to configure {@link CrossOriginSpec}.
|
||||
* @return the spec
|
||||
* @see CrossOrigin
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -23,6 +23,8 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
/**
|
||||
* Strategy for reading {@link MultipartFile} content.
|
||||
*
|
||||
* @param <T> the expected file content type.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
*
|
||||
* @since 2.0
|
||||
@@ -30,8 +32,7 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
public interface MultipartFileReader<T> {
|
||||
|
||||
/**
|
||||
* Reads {@link MultipartFile} content.
|
||||
*
|
||||
* Read {@link MultipartFile} content.
|
||||
* @param multipartFile The multipart file.
|
||||
* @return The result of reading the file.
|
||||
* @throws IOException Any IOException.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,8 @@ import org.springframework.web.multipart.MultipartRequest;
|
||||
|
||||
/**
|
||||
* @author Mark Fisher
|
||||
* @author Artem Bilan
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
public class MultipartHttpInputMessage extends ServletServerHttpRequest implements MultipartRequest {
|
||||
@@ -67,18 +69,8 @@ public class MultipartHttpInputMessage extends ServletServerHttpRequest implemen
|
||||
return this.multipartServletRequest.getParameterMap();
|
||||
}
|
||||
|
||||
/**
|
||||
* Once we depend upon Spring 3.1 as a minimum, this code can be changed to:
|
||||
* this.multipartServletRequest.getMultipartContentType(String paramOrFileName)
|
||||
*/
|
||||
public String getMultipartContentType(String paramOrFileName) {
|
||||
MultipartFile file = getFile(paramOrFileName);
|
||||
if (file != null) {
|
||||
return file.getContentType();
|
||||
}
|
||||
else {
|
||||
throw new UnsupportedOperationException("unable to retrieve multipart content-type for parameter");
|
||||
}
|
||||
return this.multipartServletRequest.getMultipartContentType(paramOrFileName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -338,9 +338,6 @@ public abstract class AbstractHttpRequestExecutingMessageHandler extends Abstrac
|
||||
return replyBuilder.copyHeaders(headers);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert Set-Cookie to Cookie
|
||||
*/
|
||||
private void doConvertSetCookie(Map<String, Object> headers) {
|
||||
String keyName = null;
|
||||
for (String key : headers.keySet()) {
|
||||
@@ -464,7 +461,7 @@ public abstract class AbstractHttpRequestExecutingMessageHandler extends Abstrac
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* If all keys are Strings, and some values are not Strings we'll consider
|
||||
* the Map to be multipart/form-data
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -93,7 +93,7 @@ public class HttpRequestExecutingMessageHandler extends AbstractHttpRequestExecu
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a handler that will send requests to the provided URI using a provided RestTemplate
|
||||
* Create a handler that will send requests to the provided URI using a provided RestTemplate.
|
||||
* @param uri The URI.
|
||||
* @param restTemplate The rest template.
|
||||
*/
|
||||
@@ -107,8 +107,8 @@ public class HttpRequestExecutingMessageHandler extends AbstractHttpRequestExecu
|
||||
Assert.hasText(uri, "URI is required");
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a handler that will send requests to the provided URI using a provided RestTemplate
|
||||
/**4
|
||||
* Create a handler that will send requests to the provided URI using a provided RestTemplate.
|
||||
* @param uriExpression A SpEL Expression that can be resolved against the message object and
|
||||
* {@link org.springframework.beans.factory.BeanFactory}.
|
||||
* @param restTemplate The rest template.
|
||||
|
||||
Reference in New Issue
Block a user