Skip to content

Commit

Permalink
Replace double spaces w/ single spaces in code & comments in spring-w…
Browse files Browse the repository at this point in the history
…ebmvc

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 spring-projectsgh-31245
  • Loading branch information
shin-mallang authored and sbrannen committed Sep 16, 2023
1 parent 56688ab commit 3d0f552
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

/**
* {@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 HttpRequestHandlerAdapter}.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ else if (!context.getRegistry().isAlias(PATH_MATCHER_BEAN_NAME) &&
}

/**
* Registers an {@link HttpRequestHandlerAdapter} under a well-known
* Registers an {@link HttpRequestHandlerAdapter} under a well-known
* name unless already registered.
*/
private static void registerBeanNameUrlHandlerMapping(ParserContext context, @Nullable Object source) {
Expand All @@ -148,7 +148,7 @@ private static void registerBeanNameUrlHandlerMapping(ParserContext context, @Nu
}

/**
* Registers an {@link HttpRequestHandlerAdapter} under a well-known
* Registers an {@link HttpRequestHandlerAdapter} under a well-known
* name unless already registered.
*/
private static void registerHttpRequestHandlerAdapter(ParserContext context, @Nullable Object source) {
Expand Down Expand Up @@ -203,7 +203,7 @@ else if (corsConfigurations != null) {
}

/**
* Registers an {@link HandlerMappingIntrospector} under a well-known name
* Registers an {@link HandlerMappingIntrospector} under a well-known name
* unless already registered.
*/
private static void registerHandlerMappingIntrospector(ParserContext context, @Nullable Object source) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ public Optional<ServerResponse> checkNotModified(Instant lastModified, String et

@Override
public String toString() {
return method() + " " + path();
return method() + " " + path();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ interface Builder {

/**
* 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)
* @return this builder
* @see HttpHeaders#add(String, String)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ interface SseBuilder {
/**
* Register a callback to be invoked when an error occurs during SSE
* processing.
* @param onError the callback to invoke on error
* @param onError the callback to invoke on error
* @return this builder
*/
SseBuilder onError(Consumer<Throwable> onError);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void setPathMatcher(PathMatcher pathMatcher) {
}

/**
* 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.
* Can specify "-1" to exclude a URL path from default caching.
* <p>For pattern syntax see {@link AntPathMatcher} and {@link PathPattern}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public PatternsRequestCondition(String... patterns) {
* {@link PathMatcher} and flag for matching trailing slashes.
* @since 5.3
*/
public PatternsRequestCondition(String[] patterns, boolean useTrailingSlashMatch,
public PatternsRequestCondition(String[] patterns, boolean useTrailingSlashMatch,
@Nullable PathMatcher pathMatcher) {

this(patterns, null, pathMatcher, useTrailingSlashMatch);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewC
redirectAttributes = new RedirectAttributesModelMap(dataBinder);
}
else {
redirectAttributes = new RedirectAttributesModelMap();
redirectAttributes = new RedirectAttributesModelMap();
}
mavContainer.setRedirectModel(redirectAttributes);
return redirectAttributes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ protected Object resolveName(String name, MethodParameter parameter, NativeWebRe
@Override
protected void handleMissingValue(String name, MethodParameter parameter) throws ServletException {
throw new ServletRequestBindingException("Missing request attribute '" + name +
"' of type " + parameter.getNestedParameterType().getSimpleName());
"' of type " + parameter.getNestedParameterType().getSimpleName());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public ServletRequestDataBinderFactory(@Nullable List<InvocableHandlerMethod> bi
*/
@Override
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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ protected ModelAndView handleAsyncRequestTimeoutException(AsyncRequestTimeoutExc
* Handle an {@link ErrorResponse} exception.
* <p>The default implementation sets status and the headers of the response
* 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)}.
* @param errorResponse the exception to be handled
* @param request current HTTP request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* <p>This handler is intended to be used with a "/*" mapping when the
* {@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
* only execute when no other more specific mappings (i.e., to controllers) can be matched.
*
Expand All @@ -45,7 +45,7 @@
* 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
* 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 Juergen Hoeller
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

/**
* 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".
*
* <p>Note: You can also set a "defaultHtmlEscape" web.xml context-param.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@
* string.
*
* <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.
*
* <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
* 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:
* <pre class="code">&lt;spring:url value="/url/path/{variableName}"&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* across elements.
*
* <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}
* map.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* the {@code labelProperty}). These properties are then used when
* 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
* 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.
* </p>
* <h3>Using a {@link Map}:</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
*
* <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
* alone via {@link #setExtractValueFromSingleKeyModel}.
* alone via {@link #setExtractValueFromSingleKeyModel}.
*
* <p>The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}.
*
Expand Down

0 comments on commit 3d0f552

Please sign in to comment.