Replace double spaces w/ single spaces in code & comments in spring-webmvc

Except for meaningful double spaces (for example, to align the
indentation of comments), this commit replaces all unnecessary double
spaces with single spaces in the spring-webmvc module.

Closes gh-31245
This commit is contained in:
shin-mallang 2023-09-16 05:33:53 +09:00 committed by Sam Brannen
parent 56688ab361
commit 3d0f55273c
17 changed files with 22 additions and 22 deletions

View File

@ -34,7 +34,7 @@ import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler
/** /**
* {@link BeanDefinitionParser} that parses a {@code default-servlet-handler} element to * {@link BeanDefinitionParser} that parses a {@code default-servlet-handler} element to
* register a {@link DefaultServletHttpRequestHandler}. Will also register a * register a {@link DefaultServletHttpRequestHandler}. Will also register a
* {@link SimpleUrlHandlerMapping} for mapping resource requests, and a * {@link SimpleUrlHandlerMapping} for mapping resource requests, and a
* {@link HttpRequestHandlerAdapter}. * {@link HttpRequestHandlerAdapter}.
* *

View File

@ -131,7 +131,7 @@ public abstract class MvcNamespaceUtils {
} }
/** /**
* Registers an {@link HttpRequestHandlerAdapter} under a well-known * Registers an {@link HttpRequestHandlerAdapter} under a well-known
* name unless already registered. * name unless already registered.
*/ */
private static void registerBeanNameUrlHandlerMapping(ParserContext context, @Nullable Object source) { private static void registerBeanNameUrlHandlerMapping(ParserContext context, @Nullable Object source) {
@ -148,7 +148,7 @@ public abstract class MvcNamespaceUtils {
} }
/** /**
* Registers an {@link HttpRequestHandlerAdapter} under a well-known * Registers an {@link HttpRequestHandlerAdapter} under a well-known
* name unless already registered. * name unless already registered.
*/ */
private static void registerHttpRequestHandlerAdapter(ParserContext context, @Nullable Object source) { private static void registerHttpRequestHandlerAdapter(ParserContext context, @Nullable Object source) {
@ -203,7 +203,7 @@ public abstract class MvcNamespaceUtils {
} }
/** /**
* Registers an {@link HandlerMappingIntrospector} under a well-known name * Registers an {@link HandlerMappingIntrospector} under a well-known name
* unless already registered. * unless already registered.
*/ */
private static void registerHandlerMappingIntrospector(ParserContext context, @Nullable Object source) { private static void registerHandlerMappingIntrospector(ParserContext context, @Nullable Object source) {

View File

@ -1189,7 +1189,7 @@ public abstract class RequestPredicates {
@Override @Override
public String toString() { public String toString() {
return method() + " " + path(); return method() + " " + path();
} }
} }

View File

@ -501,7 +501,7 @@ public interface ServerRequest {
/** /**
* Add the given header value(s) under the given name. * Add the given header value(s) under the given name.
* @param headerName the header name * @param headerName the header name
* @param headerValues the header value(s) * @param headerValues the header value(s)
* @return this builder * @return this builder
* @see HttpHeaders#add(String, String) * @see HttpHeaders#add(String, String)

View File

@ -635,7 +635,7 @@ public interface ServerResponse {
/** /**
* Register a callback to be invoked when an error occurs during SSE * Register a callback to be invoked when an error occurs during SSE
* processing. * processing.
* @param onError the callback to invoke on error * @param onError the callback to invoke on error
* @return this builder * @return this builder
*/ */
SseBuilder onError(Consumer<Throwable> onError); SseBuilder onError(Consumer<Throwable> onError);

View File

@ -155,7 +155,7 @@ public class WebContentInterceptor extends WebContentGenerator implements Handle
} }
/** /**
* Map settings for cache seconds to specific URL paths via patterns. * Map settings for cache seconds to specific URL paths via patterns.
* <p>Overrides the default cache seconds setting of this interceptor. * <p>Overrides the default cache seconds setting of this interceptor.
* Can specify "-1" to exclude a URL path from default caching. * Can specify "-1" to exclude a URL path from default caching.
* <p>For pattern syntax see {@link AntPathMatcher} and {@link PathPattern} * <p>For pattern syntax see {@link AntPathMatcher} and {@link PathPattern}

View File

@ -80,7 +80,7 @@ public class PatternsRequestCondition extends AbstractRequestCondition<PatternsR
* {@link PathMatcher} and flag for matching trailing slashes. * {@link PathMatcher} and flag for matching trailing slashes.
* @since 5.3 * @since 5.3
*/ */
public PatternsRequestCondition(String[] patterns, boolean useTrailingSlashMatch, public PatternsRequestCondition(String[] patterns, boolean useTrailingSlashMatch,
@Nullable PathMatcher pathMatcher) { @Nullable PathMatcher pathMatcher) {
this(patterns, null, pathMatcher, useTrailingSlashMatch); this(patterns, null, pathMatcher, useTrailingSlashMatch);

View File

@ -63,7 +63,7 @@ public class RedirectAttributesMethodArgumentResolver implements HandlerMethodAr
redirectAttributes = new RedirectAttributesModelMap(dataBinder); redirectAttributes = new RedirectAttributesModelMap(dataBinder);
} }
else { else {
redirectAttributes = new RedirectAttributesModelMap(); redirectAttributes = new RedirectAttributesModelMap();
} }
mavContainer.setRedirectModel(redirectAttributes); mavContainer.setRedirectModel(redirectAttributes);
return redirectAttributes; return redirectAttributes;

View File

@ -57,7 +57,7 @@ public class RequestAttributeMethodArgumentResolver extends AbstractNamedValueMe
@Override @Override
protected void handleMissingValue(String name, MethodParameter parameter) throws ServletException { protected void handleMissingValue(String name, MethodParameter parameter) throws ServletException {
throw new ServletRequestBindingException("Missing request attribute '" + name + throw new ServletRequestBindingException("Missing request attribute '" + name +
"' of type " + parameter.getNestedParameterType().getSimpleName()); "' of type " + parameter.getNestedParameterType().getSimpleName());
} }
} }

View File

@ -49,7 +49,7 @@ public class ServletRequestDataBinderFactory extends InitBinderDataBinderFactory
*/ */
@Override @Override
protected ServletRequestDataBinder createBinderInstance( protected ServletRequestDataBinder createBinderInstance(
@Nullable Object target, String objectName, NativeWebRequest request) throws Exception { @Nullable Object target, String objectName, NativeWebRequest request) throws Exception {
return new ExtendedServletRequestDataBinder(target, objectName); return new ExtendedServletRequestDataBinder(target, objectName);
} }

View File

@ -498,7 +498,7 @@ public class DefaultHandlerExceptionResolver extends AbstractHandlerExceptionRes
* Handle an {@link ErrorResponse} exception. * Handle an {@link ErrorResponse} exception.
* <p>The default implementation sets status and the headers of the response * <p>The default implementation sets status and the headers of the response
* to those obtained from the {@code ErrorResponse}. If available, the * to those obtained from the {@code ErrorResponse}. If available, the
* {@link ProblemDetail#getDetail()} is used as the message for * {@link ProblemDetail#getDetail()} is used as the message for
* {@link HttpServletResponse#sendError(int, String)}. * {@link HttpServletResponse#sendError(int, String)}.
* @param errorResponse the exception to be handled * @param errorResponse the exception to be handled
* @param request current HTTP request * @param request current HTTP request

View File

@ -35,7 +35,7 @@ import org.springframework.web.context.ServletContextAware;
* *
* <p>This handler is intended to be used with a "/*" mapping when the * <p>This handler is intended to be used with a "/*" mapping when the
* {@link org.springframework.web.servlet.DispatcherServlet DispatcherServlet} * {@link org.springframework.web.servlet.DispatcherServlet DispatcherServlet}
* is mapped to "/", thus overriding the Servlet container's default handling of static resources. * is mapped to "/", thus overriding the Servlet container's default handling of static resources.
* The mapping to this handler should generally be ordered as the last in the chain so that it will * The mapping to this handler should generally be ordered as the last in the chain so that it will
* only execute when no other more specific mappings (i.e., to controllers) can be matched. * only execute when no other more specific mappings (i.e., to controllers) can be matched.
* *
@ -45,7 +45,7 @@ import org.springframework.web.context.ServletContextAware;
* handler checks at initialization time for the presence of the default Servlet of well-known * handler checks at initialization time for the presence of the default Servlet of well-known
* containers such as Tomcat, Jetty, Resin, WebLogic and WebSphere. However, when running in a * containers such as Tomcat, Jetty, Resin, WebLogic and WebSphere. However, when running in a
* container where the default Servlet's name is not known, or where it has been customized * container where the default Servlet's name is not known, or where it has been customized
* via server configuration, the {@code defaultServletName} will need to be set explicitly. * via server configuration, the {@code defaultServletName} will need to be set explicitly.
* *
* @author Jeremy Grelle * @author Jeremy Grelle
* @author Juergen Hoeller * @author Juergen Hoeller

View File

@ -20,7 +20,7 @@ import jakarta.servlet.jsp.JspException;
/** /**
* The {@code <htmlEscape>} tag sets default HTML escape value for the current * The {@code <htmlEscape>} tag sets default HTML escape value for the current
* page. The actual value can be overridden by escaping-aware tags. * page. The actual value can be overridden by escaping-aware tags.
* The default is "false". * The default is "false".
* *
* <p>Note: You can also set a "defaultHtmlEscape" web.xml context-param. * <p>Note: You can also set a "defaultHtmlEscape" web.xml context-param.

View File

@ -57,13 +57,13 @@ import org.springframework.web.util.UriUtils;
* string. * string.
* *
* <p>Use of the spring:param tag for URI template variables is strongly recommended * <p>Use of the spring:param tag for URI template variables is strongly recommended
* over direct EL substitution as the values are URL encoded. Failure to properly * over direct EL substitution as the values are URL encoded. Failure to properly
* encode URL can leave an application vulnerable to XSS and other injection attacks. * encode URL can leave an application vulnerable to XSS and other injection attacks.
* *
* <p>URLs can be HTML/XML escaped by setting the {@link #setHtmlEscape(boolean) * <p>URLs can be HTML/XML escaped by setting the {@link #setHtmlEscape(boolean)
* 'htmlEscape'} attribute to 'true'. Detects an HTML escaping setting, either on * 'htmlEscape'} attribute to 'true'. Detects an HTML escaping setting, either on
* this tag instance, the page level, or the {@code web.xml} level. The default * this tag instance, the page level, or the {@code web.xml} level. The default
* is 'false'. When setting the URL value into a variable, escaping is not recommended. * is 'false'. When setting the URL value into a variable, escaping is not recommended.
* *
* <p>Example usage: * <p>Example usage:
* <pre class="code">&lt;spring:url value="/url/path/{variableName}"&gt; * <pre class="code">&lt;spring:url value="/url/path/{variableName}"&gt;

View File

@ -33,7 +33,7 @@ import org.springframework.util.StringUtils;
* across elements. * across elements.
* *
* <p>Additionally, this base class allows for rendering non-standard attributes * <p>Additionally, this base class allows for rendering non-standard attributes
* as part of the tag's output. These attributes are accessible to subclasses if * as part of the tag's output. These attributes are accessible to subclasses if
* needed via the {@link AbstractHtmlElementTag#getDynamicAttributes() dynamicAttributes} * needed via the {@link AbstractHtmlElementTag#getDynamicAttributes() dynamicAttributes}
* map. * map.
* *

View File

@ -43,7 +43,7 @@ import org.springframework.web.servlet.support.BindStatus;
* the {@code labelProperty}). These properties are then used when * the {@code labelProperty}). These properties are then used when
* rendering each element of the array/{@link Collection} as an '{@code option}'. * rendering each element of the array/{@link Collection} as an '{@code option}'.
* If either property name is omitted, the value of {@link Object#toString()} of * If either property name is omitted, the value of {@link Object#toString()} of
* the corresponding array/{@link Collection} element is used instead. However, * the corresponding array/{@link Collection} element is used instead. However,
* if the item is an enum, {@link Enum#name()} is used as the default value. * if the item is an enum, {@link Enum#name()} is used as the default value.
* </p> * </p>
* <h3>Using a {@link Map}:</h3> * <h3>Using a {@link Map}:</h3>

View File

@ -38,7 +38,7 @@ import org.springframework.web.servlet.View;
* *
* <p>By default, the entire contents of the model map (with the exception of framework-specific classes) * <p>By default, the entire contents of the model map (with the exception of framework-specific classes)
* will be encoded as JSON. If the model contains only one key, you can have it extracted encoded as JSON * will be encoded as JSON. If the model contains only one key, you can have it extracted encoded as JSON
* alone via {@link #setExtractValueFromSingleKeyModel}. * alone via {@link #setExtractValueFromSingleKeyModel}.
* *
* <p>The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}. * <p>The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}.
* *