Merge branch '5.3.x'

# Conflicts:
#	spring-web/src/main/java/org/springframework/web/accept/AbstractMappingContentNegotiationStrategy.java
This commit is contained in:
Sam Brannen 2022-07-12 12:14:52 +02:00
commit 3f993f8639
61 changed files with 101 additions and 101 deletions

View File

@ -576,7 +576,7 @@ public final class ContentDisposition {
}
escaped = (!escaped && c == '\\');
}
// Remove backslash at the end..
// Remove backslash at the end.
if (escaped) {
sb.deleteCharAt(sb.length() - 1);
}

View File

@ -21,7 +21,7 @@ import org.springframework.util.Assert;
/**
* Represents an HTTP cookie as a name-value pair consistent with the content of
* the "Cookie" request header. The {@link ResponseCookie} sub-class has the
* the "Cookie" request header. The {@link ResponseCookie} subclass has the
* additional attributes expected in the "Set-Cookie" response header.
*
* @author Rossen Stoyanchev

View File

@ -1605,7 +1605,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
}
/**
* Retrieve a combined result from the field values of multi-valued headers.
* Retrieve a combined result from the field values of multivalued headers.
* @param headerName the header name
* @return the combined result
* @since 4.3

View File

@ -22,7 +22,7 @@ import reactor.core.publisher.Flux;
import org.springframework.core.io.buffer.DataBuffer;
/**
* An "reactive" HTTP input message that exposes the input as {@link Publisher}.
* A "reactive" HTTP input message that exposes the input as {@link Publisher}.
*
* <p>Typically implemented by an HTTP request on the server-side or a response
* on the client-side.

View File

@ -193,7 +193,7 @@ public final class ResponseCookie extends HttpCookie {
/**
* Factory method to obtain a builder for a server-defined cookie. Unlike
* {@link #from(String, String)} this option assumes input from a remote
* server, which can be handled more leniently, e.g. ignoring a empty domain
* server, which can be handled more leniently, e.g. ignoring an empty domain
* name with double quotes.
* @param name the cookie name
* @param value the cookie value

View File

@ -32,7 +32,7 @@ import org.springframework.util.MultiValueMap;
/**
* Wraps another {@link ClientHttpRequest} and delegates all methods to it.
* Sub-classes can override specific methods selectively.
* Subclasses can override specific methods selectively.
*
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -27,7 +27,7 @@ import org.springframework.util.MultiValueMap;
/**
* Wraps another {@link ClientHttpResponse} and delegates all methods to it.
* Sub-classes can override specific methods selectively.
* Subclasses can override specific methods selectively.
*
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -44,7 +44,7 @@ import org.springframework.lang.Nullable;
* <li>Catch-all readers or writers, e.g. String with any media type.
* </ol>
*
* <p>Typed and object readers are further sub-divided and ordered as follows:
* <p>Typed and object readers are further subdivided and ordered as follows:
* <ol>
* <li>Default HTTP reader and writer registrations.
* <li>Custom readers and writers.

View File

@ -76,7 +76,7 @@ public interface HttpMessageWriter<T> {
boolean canWrite(ResolvableType elementType, @Nullable MediaType mediaType);
/**
* Write an given stream of object to the output message.
* Write a given stream of object to the output message.
* @param inputStream the objects to write
* @param elementType the type of objects in the stream which must have been
* previously checked via {@link #canWrite(ResolvableType, MediaType)}

View File

@ -115,7 +115,7 @@ public class DefaultPartHttpMessageReader extends LoggingCodecSupport implements
* Configure the maximum amount of disk space allowed for file parts.
* <p>By default this is set to -1, meaning that there is no maximum.
* <p>Note that this property is ignored when
* {@linkplain #setStreaming(boolean) streaming} is enabled, , or when
* {@linkplain #setStreaming(boolean) streaming} is enabled, or when
* {@link #setMaxInMemorySize(int) maxInMemorySize} is set to -1.
*/
public void setMaxDiskUsagePerPart(long maxDiskUsagePerPart) {

View File

@ -38,7 +38,7 @@ public interface FilePart extends Part {
* the directory portion, the file name could also contain characters such
* as ".." and others that can be used maliciously. It is recommended to not
* use this filename directly. Preferably generate a unique one and save
* this one one somewhere for reference, if necessary.
* this one somewhere for reference, if necessary.
* @return the original filename, or the empty String if no file has been chosen
* in the multipart form, or {@code null} if not defined or not available
* @see <a href="https://tools.ietf.org/html/rfc7578#section-4.2">RFC 7578, Section 4.2</a>

View File

@ -492,7 +492,7 @@ final class MultipartParser extends BaseSubscriber<DataBuffer> {
/**
* The state of the parser dealing with multipart bodies. Relays
* data buffers as {@link BodyToken} until the boundary is found (or
* rather: {@code CR LF - - boundary}.
* rather: {@code CR LF - - boundary}).
*/
private final class BodyState implements State {

View File

@ -107,7 +107,7 @@ public class MultipartWriterSupport extends LoggingCodecSupport {
/**
* Prepare the {@code MediaType} to use by adding "boundary" and "charset"
* parameters to the given {@code mediaType} or "mulitpart/form-data"
* parameters to the given {@code mediaType} or "multipart/form-data"
* otherwise by default.
*/
protected MediaType getMultipartMediaType(@Nullable MediaType mediaType, byte[] boundary) {

View File

@ -28,7 +28,7 @@ import org.springframework.http.HttpHeaders;
* <p>The origin of a multipart request may be a browser form in which case each
* part is either a {@link FormFieldPart} or a {@link FilePart}.
*
* <p>Multipart requests may also be used outside of a browser for data of any
* <p>Multipart requests may also be used outside a browser for data of any
* content type (e.g. JSON, PDF, etc).
*
* @author Sebastien Deleuze

View File

@ -53,7 +53,7 @@ import org.springframework.util.FastByteArrayOutputStream;
/**
* Subscribes to a token stream (i.e. the result of
* {@link MultipartParser#parse(Flux, byte[], int, Charset)}, and produces a flux of {@link Part} objects.
* {@link MultipartParser#parse(Flux, byte[], int, Charset)}), and produces a flux of {@link Part} objects.
*
* @author Arjen Poutsma
* @since 5.3
@ -219,7 +219,7 @@ final class PartGenerator extends BaseSubscriber<MultipartParser.Token> {
* creating a single {@link Part}.
* {@link State} instances are stateful, and created when a new
* {@link MultipartParser.HeadersToken} is accepted (see
* {@link #newPart(State, HttpHeaders)}.
* {@link #newPart(State, HttpHeaders)}).
* The following rules determine which state the creator will have:
* <ol>
* <li>If the part is a {@linkplain MultipartUtils#isFormField(HttpHeaders) form field},

View File

@ -67,7 +67,7 @@ abstract class BaseCodecConfigurer implements CodecConfigurer {
}
/**
* Sub-classes should override this to create a deep copy of
* Subclasses should override this to create a deep copy of
* {@link BaseDefaultCodecs} which can be client or server specific.
* @since 5.1.12
*/

View File

@ -40,14 +40,14 @@ public interface GenericHttpMessageConverter<T> extends HttpMessageConverter<T>
/**
* Indicates whether the given type can be read by this converter.
* This method should perform the same checks than
* This method should perform the same checks as
* {@link HttpMessageConverter#canRead(Class, MediaType)} with additional ones
* related to the generic type.
* @param type the (potentially generic) type to test for readability
* @param contextClass a context class for the target type, for example a class
* in which the target type appears in a method signature (can be {@code null})
* @param mediaType the media type to read, can be {@code null} if not specified.
* Typically the value of a {@code Content-Type} header.
* Typically, the value of a {@code Content-Type} header.
* @return {@code true} if readable; {@code false} otherwise
*/
boolean canRead(Type type, @Nullable Class<?> contextClass, @Nullable MediaType mediaType);
@ -69,7 +69,7 @@ public interface GenericHttpMessageConverter<T> extends HttpMessageConverter<T>
/**
* Indicates whether the given class can be written by this converter.
* <p>This method should perform the same checks than
* <p>This method should perform the same checks as
* {@link HttpMessageConverter#canWrite(Class, MediaType)} with additional ones
* related to the generic type.
* @param type the (potentially generic) type to test for writability
@ -83,7 +83,7 @@ public interface GenericHttpMessageConverter<T> extends HttpMessageConverter<T>
boolean canWrite(@Nullable Type type, Class<?> clazz, @Nullable MediaType mediaType);
/**
* Write an given object to the given output message.
* Write a given object to the given output message.
* @param t the object to write to the output message. The type of this object must
* have previously been passed to the {@link #canWrite canWrite} method of this
* interface, which must have returned {@code true}.

View File

@ -92,7 +92,7 @@ public interface HttpMessageConverter<T> {
throws IOException, HttpMessageNotReadableException;
/**
* Write an given object to the given output message.
* Write a given object to the given output message.
* @param t the object to write to the output message. The type of this object must have previously been
* passed to the {@link #canWrite canWrite} method of this interface, which must have returned {@code true}.
* @param contentType the content type to use when writing. May be {@code null} to indicate that the

View File

@ -79,7 +79,7 @@ public class MappingJackson2HttpMessageConverter extends AbstractJackson2HttpMes
}
/**
* Indicate whether the JSON output by this view should be prefixed with ")]}', ". Default is false.
* Indicate whether the JSON output by this view should be prefixed with ")]}', ". Default is {@code false}.
* <p>Prefixing the JSON string in this manner is used to help prevent JSON Hijacking.
* The prefix renders the string syntactically invalid as a script so that it cannot be hijacked.
* This prefix should be stripped before parsing the string as JSON.

View File

@ -21,7 +21,7 @@ import java.net.URI;
import org.springframework.lang.Nullable;
/**
* Specialization of {@link PathContainer} that sub-divides the path into a
* Specialization of {@link PathContainer} that subdivides the path into a
* {@link #contextPath()} and the remaining {@link #pathWithinApplication()}.
* The latter is typically used for request mapping within the application
* while the former is useful when preparing external links that point back to

View File

@ -33,8 +33,8 @@ public interface ServerHttpAsyncRequestControl {
void start();
/**
* A variation on {@link #start()} that allows specifying a timeout value to use to
* use for asynchronous processing. If {@link #complete()} is not called within the
* A variation on {@link #start()} that allows specifying a timeout value to use
* for asynchronous processing. If {@link #complete()} is not called within the
* specified value, the request times out.
*/
void start(long timeout);

View File

@ -123,7 +123,7 @@ public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
}
/**
* Sub-classes can call this method to delegate a contain notification when
* Subclasses can call this method to delegate a contain notification when
* all data has been read.
*/
public void onAllDataRead() {
@ -135,7 +135,7 @@ public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
}
/**
* Sub-classes can call this to delegate container error notifications.
* Subclasses can call this to delegate container error notifications.
*/
public final void onError(Throwable ex) {
State state = this.state.get();
@ -173,7 +173,7 @@ public abstract class AbstractListenerReadPublisher<T> implements Publisher<T> {
/**
* Invoked after an I/O read error from the underlying server or after a
* cancellation signal from the downstream consumer to allow sub-classes
* cancellation signal from the downstream consumer to allow subclasses
* to discard any current cached data they might have.
* @since 5.0.11
*/

View File

@ -122,7 +122,7 @@ public abstract class AbstractListenerWriteFlushProcessor<T> implements Processo
/**
* Error signal from the upstream, write Publisher. This is also used by
* sub-classes to delegate error notifications from the container.
* subclasses to delegate error notifications from the container.
*/
@Override
public final void onError(Throwable ex) {
@ -135,7 +135,7 @@ public abstract class AbstractListenerWriteFlushProcessor<T> implements Processo
/**
* Completion signal from the upstream, write Publisher. This is also used
* by sub-classes to delegate completion notifications from the container.
* by subclasses to delegate completion notifications from the container.
*/
@Override
public final void onComplete() {

View File

@ -121,7 +121,7 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
/**
* Error signal from the upstream, write Publisher. This is also used by
* sub-classes to delegate error notifications from the container.
* subclasses to delegate error notifications from the container.
*/
@Override
public final void onError(Throwable ex) {
@ -134,7 +134,7 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
/**
* Completion signal from the upstream, write Publisher. This is also used
* by sub-classes to delegate completion notifications from the container.
* by subclasses to delegate completion notifications from the container.
*/
@Override
public final void onComplete() {
@ -269,7 +269,7 @@ public abstract class AbstractListenerWriteProcessor<T> implements Processor<T,
}
/**
* Invoked when an I/O error occurs during a write. Sub-classes may choose
* Invoked when an I/O error occurs during a write. Subclasses may choose
* to ignore this if they know the underlying API will provide an error
* notification in a container thread.
* <p>Defaults to no-op.

View File

@ -175,7 +175,7 @@ public abstract class AbstractServerHttpRequest implements ServerHttpRequest {
* an {@link HttpCookie} map. The return value is turned into an immutable
* map and cached.
* <p>Note that this method is invoked lazily on access to
* {@link #getCookies()}. Sub-classes should synchronize cookie
* {@link #getCookies()}. Subclasses should synchronize cookie
* initialization if the underlying "native" request does not provide
* thread-safe access to cookie data.
*/

View File

@ -224,7 +224,7 @@ public abstract class AbstractServerHttpResponse implements ServerHttpResponse {
}
/**
* A variant of {@link #doCommit(Supplier)} for a response without no body.
* A variant of {@link #doCommit(Supplier)} for a response without a body.
* @return a completion publisher
*/
protected Mono<Void> doCommit() {
@ -290,9 +290,9 @@ public abstract class AbstractServerHttpResponse implements ServerHttpResponse {
protected abstract void applyStatusCode();
/**
* Invoked when the response is getting committed allowing sub-classes to
* Invoked when the response is getting committed allowing subclasses to
* make apply header values to the underlying response.
* <p>Note that most sub-classes use an {@link HttpHeaders} instance that
* <p>Note that most subclasses use an {@link HttpHeaders} instance that
* wraps an adapter to the native response headers such that changes are
* propagated to the underlying response on the go. That means this callback
* is typically not used other than for specialized updates such as setting
@ -307,7 +307,7 @@ public abstract class AbstractServerHttpResponse implements ServerHttpResponse {
protected abstract void applyCookies();
/**
* Allow sub-classes to associate a hint with the data buffer if it is a
* Allow subclasses to associate a hint with the data buffer if it is a
* pooled buffer and supports leak tracking.
* @param buffer the buffer to attach a hint to
* @since 5.3.2

View File

@ -50,7 +50,7 @@ public interface ServerHttpRequest extends HttpRequest, ReactiveHttpInputMessage
/**
* Returns a structured representation of the full request path up to but
* not including the {@link #getQueryParams() query}.
* <p>The returned path is sub-divided into a
* <p>The returned path is subdivided into a
* {@link RequestPath#contextPath()} portion and the remaining
* {@link RequestPath#pathWithinApplication() pathWithinApplication} portion.
* The latter can be passed into methods of

View File

@ -32,7 +32,7 @@ import org.springframework.util.MultiValueMap;
/**
* Wraps another {@link ServerHttpRequest} and delegates all methods to it.
* Sub-classes can override specific methods selectively.
* Subclasses can override specific methods selectively.
*
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -32,7 +32,7 @@ import org.springframework.util.MultiValueMap;
/**
* Wraps another {@link ServerHttpResponse} and delegates all methods to it.
* Sub-classes can override specific methods selectively.
* Subclasses can override specific methods selectively.
*
* @author Rossen Stoyanchev
* @since 5.0

View File

@ -158,7 +158,7 @@ class ServletServerHttpResponse extends AbstractListenerServerHttpResponse {
// For Jetty, starting 9.4.21+ we could adapt to HttpCookie:
// https://github.com/eclipse/jetty.project/issues/3040
// For Tomcat it seems to be a global option only:
// For Tomcat, it seems to be a global option only:
// https://tomcat.apache.org/tomcat-8.5-doc/config/cookie-processor.html
for (List<ResponseCookie> cookies : getCookies().values()) {

View File

@ -199,7 +199,7 @@ class UndertowServerHttpResponse extends AbstractListenerServerHttpResponse impl
return false;
}
// Track write listener calls from here on..
// Track write listener calls from here on.
this.writePossible = false;
// In case of IOException, onError handling should call discardData(DataBuffer)..
@ -213,7 +213,7 @@ class UndertowServerHttpResponse extends AbstractListenerServerHttpResponse impl
return false;
}
// We wrote all, so can still write more..
// We wrote all, so can still write more.
this.writePossible = true;
DataBufferUtils.release(dataBuffer);
@ -288,7 +288,7 @@ class UndertowServerHttpResponse extends AbstractListenerServerHttpResponse impl
protected boolean isWritePossible() {
StreamSinkChannel channel = UndertowServerHttpResponse.this.responseChannel;
if (channel != null) {
// We can always call flush, just ensure writes are on..
// We can always call flush, just ensure writes are on.
channel.resumeWrites();
return true;
}

View File

@ -40,9 +40,9 @@ import org.springframework.web.context.request.NativeWebRequest;
* through the base class {@link MappingMediaTypeFileExtensionResolver} which
* stores such mappings.
*
* <p>The method {@link #handleNoMatch} allow sub-classes to plug in additional
* <p>The method {@link #handleNoMatch} allow subclasses to plug in additional
* ways of looking up media types (e.g. through the Java Activation framework,
* or {@link jakarta.servlet.ServletContext#getMimeType}. Media types resolved
* or {@link jakarta.servlet.ServletContext#getMimeType}). Media types resolved
* via base classes are then added to the base class
* {@link MappingMediaTypeFileExtensionResolver}, i.e. cached for new lookups.
*
@ -142,7 +142,7 @@ public abstract class AbstractMappingContentNegotiationStrategy extends MappingM
/**
* Override to provide handling when a key is not resolved via.
* {@link #lookupMediaType}. Sub-classes can take further steps to
* {@link #lookupMediaType}. Subclasses can take further steps to
* determine the media type(s). If a MediaType is returned from
* this method it will be added to the cache in the base class.
*/

View File

@ -48,7 +48,7 @@ public abstract class ServletRequestUtils {
/**
* Get an Integer parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* Throws an exception if the parameter value isn't a number.
* @param request current HTTP request
* @param name the name of the parameter
* @return the Integer value, or {@code null} if not present
@ -112,7 +112,7 @@ public abstract class ServletRequestUtils {
}
/**
* Get an array of int parameters, throwing an exception if not found or one is not a number..
* Get an array of int parameters, throwing an exception if not found or one is not a number.
* @param request current HTTP request
* @param name the name of the parameter with multiple possible values
* @throws ServletRequestBindingException a subclass of ServletException,
@ -127,7 +127,7 @@ public abstract class ServletRequestUtils {
/**
* Get a Long parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* Throws an exception if the parameter value isn't a number.
* @param request current HTTP request
* @param name the name of the parameter
* @return the Long value, or {@code null} if not present
@ -206,7 +206,7 @@ public abstract class ServletRequestUtils {
/**
* Get a Float parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* Throws an exception if the parameter value isn't a number.
* @param request current HTTP request
* @param name the name of the parameter
* @return the Float value, or {@code null} if not present
@ -285,7 +285,7 @@ public abstract class ServletRequestUtils {
/**
* Get a Double parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a number.
* Throws an exception if the parameter value isn't a number.
* @param request current HTTP request
* @param name the name of the parameter
* @return the Double value, or {@code null} if not present
@ -364,7 +364,7 @@ public abstract class ServletRequestUtils {
/**
* Get a Boolean parameter, or {@code null} if not present.
* Throws an exception if it the parameter value isn't a boolean.
* Throws an exception if the parameter value isn't a boolean.
* <p>Accepts "true", "on", "yes" (any case) and "1" as values for true;
* treats every other non-empty value as false (i.e. parses leniently).
* @param request current HTTP request

View File

@ -36,7 +36,7 @@ import org.springframework.web.multipart.MultipartFile;
*
* <p><strong>WARNING</strong>: Data binding can lead to security issues by exposing
* parts of the object graph that are not meant to be accessed or modified by
* external clients. Therefore the design and use of data binding should be considered
* external clients. Therefore, the design and use of data binding should be considered
* carefully with regard to security. For more details, please refer to the dedicated
* sections on data binding for
* <a href="https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc-ann-initbinder-model-design">Spring Web MVC</a> and
@ -48,7 +48,7 @@ import org.springframework.web.multipart.MultipartFile;
* the form, but did not generate a request parameter because it was empty.
* A field marker allows to detect that state and reset the corresponding
* bean property accordingly. Default values, for parameters that are otherwise
* not present, can specify a value for the field other then empty.
* not present, can specify a value for the field other than empty.
*
* @author Juergen Hoeller
* @author Scott Andrews

View File

@ -69,7 +69,7 @@ public class HttpClientErrorException extends HttpStatusCodeException {
/**
* Constructor with a status code and status text, headers, and content,
* and an prepared message.
* and a prepared message.
* @since 5.2.2
*/
public HttpClientErrorException(String message, HttpStatusCode statusCode, String statusText,
@ -80,7 +80,7 @@ public class HttpClientErrorException extends HttpStatusCodeException {
/**
* Create {@code HttpClientErrorException} or an HTTP status specific sub-class.
* Create {@code HttpClientErrorException} or an HTTP status specific subclass.
* @since 5.1
*/
public static HttpClientErrorException create(

View File

@ -68,7 +68,7 @@ public class HttpServerErrorException extends HttpStatusCodeException {
}
/**
* Constructor with a status code and status text, headers, content, and an
* Constructor with a status code and status text, headers, content, and a
* prepared message.
* @since 5.2.2
*/
@ -79,7 +79,7 @@ public class HttpServerErrorException extends HttpStatusCodeException {
}
/**
* Create an {@code HttpServerErrorException} or an HTTP status specific sub-class.
* Create an {@code HttpServerErrorException} or an HTTP status specific subclass.
* @since 5.1
*/
public static HttpServerErrorException create(HttpStatusCode statusCode,
@ -173,7 +173,7 @@ public class HttpServerErrorException extends HttpStatusCodeException {
}
/**
* {@link HttpServerErrorException} for status HTTP HTTP 502 Bad Gateway.
* {@link HttpServerErrorException} for HTTP status 502 Bad Gateway.
* @since 5.1
*/
@SuppressWarnings("serial")

View File

@ -463,27 +463,27 @@ public interface RestOperations {
// OPTIONS
/**
* Return the value of the Allow header for the given URI.
* Return the value of the {@code Allow} header for the given URI.
* <p>URI Template variables are expanded using the given URI variables, if any.
* @param url the URL
* @param uriVariables the variables to expand in the template
* @return the value of the allow header
* @return the value of the {@code Allow} header
*/
Set<HttpMethod> optionsForAllow(String url, Object... uriVariables) throws RestClientException;
/**
* Return the value of the Allow header for the given URI.
* Return the value of the {@code Allow} header for the given URI.
* <p>URI Template variables are expanded using the given map.
* @param url the URL
* @param uriVariables the variables to expand in the template
* @return the value of the allow header
* @return the value of the {@code Allow} header
*/
Set<HttpMethod> optionsForAllow(String url, Map<String, ?> uriVariables) throws RestClientException;
/**
* Return the value of the Allow header for the given URL.
* Return the value of the {@code Allow} header for the given URL.
* @param url the URL
* @return the value of the allow header
* @return the value of the {@code Allow} header
*/
Set<HttpMethod> optionsForAllow(URI url) throws RestClientException;

View File

@ -55,7 +55,7 @@ public interface WebRequest extends RequestAttributes {
String[] getHeaderValues(String headerName);
/**
* Return a Iterator over request header names.
* Return an Iterator over request header names.
* @since 3.0
* @see jakarta.servlet.http.HttpServletRequest#getHeaderNames()
*/
@ -79,14 +79,14 @@ public interface WebRequest extends RequestAttributes {
String[] getParameterValues(String paramName);
/**
* Return a Iterator over request parameter names.
* Return an Iterator over request parameter names.
* @since 3.0
* @see jakarta.servlet.http.HttpServletRequest#getParameterNames()
*/
Iterator<String> getParameterNames();
/**
* Return a immutable Map of the request parameters, with parameter names as map keys
* Return an immutable Map of the request parameters, with parameter names as map keys
* and parameter values as map values. The map values will be of type String array.
* <p>A single-value parameter will be exposed as an array with a single element.
* @see jakarta.servlet.http.HttpServletRequest#getParameterMap()
@ -154,7 +154,7 @@ public interface WebRequest extends RequestAttributes {
* also with conditional POST/PUT/DELETE requests.
* <p><strong>Note:</strong> you can use either
* this {@code #checkNotModified(long)} method; or
* {@link #checkNotModified(String)}. If you want enforce both
* {@link #checkNotModified(String)}. If you want to enforce both
* a strong entity tag and a Last-Modified value,
* as recommended by the HTTP specification,
* then you should use {@link #checkNotModified(String, long)}.
@ -189,7 +189,7 @@ public interface WebRequest extends RequestAttributes {
* }</pre>
* <p><strong>Note:</strong> you can use either
* this {@code #checkNotModified(String)} method; or
* {@link #checkNotModified(long)}. If you want enforce both
* {@link #checkNotModified(long)}. If you want to enforce both
* a strong entity tag and a Last-Modified value,
* as recommended by the HTTP specification,
* then you should use {@link #checkNotModified(String, long)}.

View File

@ -115,7 +115,7 @@ public interface DeferredResultProcessingInterceptor {
* subsequent interceptors are not invoked
* @param t the error that occurred while request processing
* @return {@code true} if error handling should continue, or {@code false} if
* other interceptors should by bypassed and not be invoked
* other interceptors should be bypassed and not be invoked
* @throws Exception in case of errors
*/
default <T> boolean handleError(NativeWebRequest request, DeferredResult<T> deferredResult,

View File

@ -43,7 +43,7 @@ import org.springframework.web.context.ServletContextAware;
* on web application startup.
*
* <p>This class is as easy to subclass as AbstractRefreshableApplicationContext:
* All you need to implements is the {@link #loadBeanDefinitions} method;
* All you need to implement is the {@link #loadBeanDefinitions} method;
* see the superclass javadoc for details. Note that implementations are supposed
* to load bean definitions from the files specified by the locations returned
* by the {@link #getConfigLocations} method.

View File

@ -97,7 +97,7 @@ public class ServletContextResourcePatternResolver extends PathMatchingResourceP
* adding them to the given result set.
* @param servletContext the ServletContext to work on
* @param fullPattern the pattern to match against,
* with preprended root directory path
* with prepended root directory path
* @param dir the current directory
* @param result the Set of matching Resources to add to
* @throws IOException if directory contents could not be retrieved

View File

@ -131,7 +131,7 @@ public class CorsConfiguration {
* is rejected in favor of using {@link #setAllowedOriginPatterns
* allowedOriginPatterns} instead.
* <p>By default this is not set which means that no origins are allowed.
* However an instance of this class is often initialized further, e.g. for
* However, an instance of this class is often initialized further, e.g. for
* {@code @CrossOrigin}, via {@link #applyPermitDefaultValues()}.
*/
public void setAllowedOrigins(@Nullable List<String> origins) {
@ -457,7 +457,7 @@ public class CorsConfiguration {
}
/**
* Validate that when {@link #setAllowCredentials allowCredentials} is true,
* Validate that when {@link #setAllowCredentials allowCredentials} is {@code true},
* {@link #setAllowedOrigins allowedOrigins} does not contain the special
* value {@code "*"} since in that case the "Access-Control-Allow-Origin"
* cannot be set to {@code "*"}.

View File

@ -40,7 +40,7 @@ import org.springframework.web.util.WebUtils;
* {@link jakarta.servlet.DispatcherType#ASYNC ASYNC} dispatches that occur in
* separate threads. A filter can be configured in {@code web.xml} whether it
* should be involved in async dispatches. However, in some cases servlet
* containers assume different default configuration. Therefore sub-classes can
* containers assume different default configuration. Therefore, subclasses can
* override the method {@link #shouldNotFilterAsyncDispatch()} to declare
* statically if they should indeed be invoked, <em>once</em>, during both types
* of dispatches in order to provide thread initialization, logging, security,

View File

@ -129,7 +129,7 @@ public class ShallowEtagHeaderFilter extends OncePerRequestFilter {
/**
* Whether an ETag should be calculated for the given request and response
* exchange. By default this is {@code true} if all of the following match:
* exchange. By default, this is {@code true} if all the following match:
* <ul>
* <li>Response is not committed.</li>
* <li>Response status codes is in the {@code 2xx} series.</li>

View File

@ -108,7 +108,7 @@ public class HandlerMethod {
/**
* Variant of {@link #HandlerMethod(Object, Method)} that
* also accepts a {@link MessageSource} for use from sub-classes.
* also accepts a {@link MessageSource} for use from subclasses.
* @since 5.3.10
*/
protected HandlerMethod(Object bean, Method method, @Nullable MessageSource messageSource) {
@ -277,7 +277,7 @@ public class HandlerMethod {
/**
* If the bean method is a bridge method, this method returns the bridged
* (user-defined) method. Otherwise it returns the same method as {@link #getMethod()}.
* (user-defined) method. Otherwise, it returns the same method as {@link #getMethod()}.
*/
protected Method getBridgedMethod() {
return this.bridgedMethod;

View File

@ -35,7 +35,7 @@ import org.springframework.util.StringUtils;
* <strong>any</strong> of the following selectors match:
* <ul>
* <li>Base packages -- for selecting handlers by their package.
* <li>Assignable types -- for selecting handlers by super type.
* <li>Assignable types -- for selecting handlers by supertype.
* <li>Annotations -- for selecting handlers annotated in a specific way.
* </ul>
* <p>Composability methods on {@link Predicate} can be used :

View File

@ -30,7 +30,7 @@ import org.springframework.web.method.support.ModelAndViewContainer;
/**
* Resolves {@link Map} method arguments and handles {@link Map} return values.
*
* <p>A Map return value can be interpreted in more than one ways depending
* <p>A Map return value can be interpreted in more than one way depending
* on the presence of annotations like {@code @ModelAttribute} or
* {@code @ResponseBody}. As of 5.2 this resolver returns false if the
* parameter is annotated.

View File

@ -73,7 +73,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
/**
* Variant of {@link #InvocableHandlerMethod(Object, Method)} that
* also accepts a {@link MessageSource}, for use in sub-classes.
* also accepts a {@link MessageSource}, for use in subclasses.
* @since 5.3.10
*/
protected InvocableHandlerMethod(Object bean, Method method, @Nullable MessageSource messageSource) {

View File

@ -74,7 +74,7 @@ public class ModelAndViewContainer {
/**
* By default the content of the "default" model is used both during
* By default, the content of the "default" model is used both during
* rendering and redirect scenarios. Alternatively controller methods
* can declare an argument of type {@code RedirectAttributes} and use
* it to provide attributes to prepare the redirect URL.
@ -115,7 +115,7 @@ public class ModelAndViewContainer {
}
/**
* Return the View object, or {@code null} if we using a view name
* Return the View object, or {@code null} if we are using a view name
* to be resolved by the DispatcherServlet via a ViewResolver.
*/
@Nullable

View File

@ -58,7 +58,7 @@ public interface MultipartFile extends InputStreamSource {
* the directory portion, the file name could also contain characters such
* as ".." and others that can be used maliciously. It is recommended to not
* use this filename directly. Preferably generate a unique one and save
* this one one somewhere for reference, if necessary.
* this one somewhere for reference, if necessary.
* @return the original filename, or the empty String if no file has been chosen
* in the multipart form, or {@code null} if not defined or not available
* @see <a href="https://tools.ietf.org/html/rfc7578#section-4.2">RFC 7578, Section 4.2</a>

View File

@ -110,9 +110,9 @@ public interface MultipartResolver {
MultipartHttpServletRequest resolveMultipart(HttpServletRequest request) throws MultipartException;
/**
* Cleanup any resources used for the multipart handling,
* Clean up any resources used for the multipart handling,
* like a storage for the uploaded files.
* @param request the request to cleanup resources for
* @param request the request to clean up resources for
*/
void cleanupMultipart(MultipartHttpServletRequest request);

View File

@ -202,7 +202,7 @@ public interface ServerWebExchange {
/**
* Transform the given url according to the registered transformation function(s).
* By default, this method returns the given {@code url}, though additional
* transformation functions can by registered with {@link #addUrlTransformer}
* transformation functions can be registered with {@link #addUrlTransformer}
* @param url the URL to transform
* @return the transformed URL
*/

View File

@ -26,7 +26,7 @@ import org.springframework.web.server.ServerWebExchange;
* via the HTTP exchange.
*
* <p>The {@link org.springframework.context.i18n.LocaleContext} object can potentially
* includes associated time zone and other locale related information.
* include associated time zone and other locale related information.
*
* @author Sebastien Deleuze
* @since 5.0

View File

@ -538,7 +538,7 @@ final class HierarchicalUriComponents extends UriComponents {
if (getHost() != null) {
builder.host(getHost());
}
// Avoid parsing the port, may have URI variable..
// Avoid parsing the port, may have URI variable.
if (this.port != null) {
builder.port(this.port);
}

View File

@ -69,7 +69,7 @@ public abstract class ServletContextPropertyUtils {
* @param servletContext the servletContext to use for lookups.
* @param ignoreUnresolvablePlaceholders flag to determine is unresolved placeholders are ignored
* @return the resolved String
* @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is false
* @throws IllegalArgumentException if there is an unresolvable placeholder and the flag is {@code false}
* @see SystemPropertyUtils#PLACEHOLDER_PREFIX
* @see SystemPropertyUtils#PLACEHOLDER_SUFFIX
* @see SystemPropertyUtils#resolvePlaceholders(String, boolean)

View File

@ -79,7 +79,7 @@ class LiteralPathElement extends PathElement {
}
else {
for (int i = 0; i < this.len; i++) {
// TODO revisit performance if doing a lot of case insensitive matching
// TODO revisit performance if doing a lot of case-insensitive matching
if (Character.toLowerCase(value.charAt(i)) != this.text[i]) {
return false;
}

View File

@ -113,7 +113,7 @@ public class PathPattern implements Comparable<PathPattern> {
/** If this pattern has no trailing slash, allow candidates to include one and still match successfully. */
private final boolean matchOptionalTrailingSeparator;
/** Will this match candidates in a case sensitive way? (case sensitivity at parse time). */
/** Will this match candidates in a case-sensitive way? (case sensitivity at parse time). */
private final boolean caseSensitive;
/** First path element in the parsed chain of path elements for this pattern. */

View File

@ -21,7 +21,7 @@ import org.springframework.http.server.PathContainer.PathSegment;
import org.springframework.web.util.pattern.PathPattern.MatchingContext;
/**
* A literal path element that does includes the single character wildcard '?' one
* A literal path element that includes the single character wildcard '?' one
* or more times (to basically many any character at that position).
*
* @author Andy Clement

View File

@ -87,7 +87,7 @@ public class ListenerWriteProcessorTests {
@Test // SPR-17410
public void onNextWithoutDemand() {
// Disable writing: next item will be cached..
// Disable writing: next item will be cached.
this.processor.setWritePossible(false);
DataBuffer buffer1 = mock(DataBuffer.class);
this.processor.onNext(buffer1);

View File

@ -28,7 +28,7 @@ import org.springframework.web.context.request.NativeWebRequest;
import static org.assertj.core.api.Assertions.assertThat;
/**
* A test fixture with a test sub-class of AbstractMappingContentNegotiationStrategy.
* A test fixture with a test subclass of AbstractMappingContentNegotiationStrategy.
*
* @author Rossen Stoyanchev
* @since 3.2

View File

@ -231,7 +231,7 @@ public final class MockServerHttpRequest extends AbstractServerHttpRequest {
}
/**
* Create a builder with a raw HTTP method value value that is outside the
* Create a builder with a raw HTTP method value that is outside the
* range of {@link HttpMethod} enum values.
* @param httpMethod the HTTP methodValue value
* @param uri the URI template for target the URL
@ -253,7 +253,7 @@ public final class MockServerHttpRequest extends AbstractServerHttpRequest {
/**
* Request builder exposing properties not related to the body.
* @param <B> the builder sub-class
* @param <B> the builder subclass
*/
public interface BaseBuilder<B extends BaseBuilder<B>> {