Skip to content

Commit 3d0f552

Browse files
shin-mallangsbrannen
authored andcommitted
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
1 parent 56688ab commit 3d0f552

17 files changed

+22
-22
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/config/DefaultServletHandlerBeanDefinitionParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
/**
3636
* {@link BeanDefinitionParser} that parses a {@code default-servlet-handler} element to
37-
* register a {@link DefaultServletHttpRequestHandler}. Will also register a
37+
* register a {@link DefaultServletHttpRequestHandler}. Will also register a
3838
* {@link SimpleUrlHandlerMapping} for mapping resource requests, and a
3939
* {@link HttpRequestHandlerAdapter}.
4040
*

spring-webmvc/src/main/java/org/springframework/web/servlet/config/MvcNamespaceUtils.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ else if (!context.getRegistry().isAlias(PATH_MATCHER_BEAN_NAME) &&
131131
}
132132

133133
/**
134-
* Registers an {@link HttpRequestHandlerAdapter} under a well-known
134+
* Registers an {@link HttpRequestHandlerAdapter} under a well-known
135135
* name unless already registered.
136136
*/
137137
private static void registerBeanNameUrlHandlerMapping(ParserContext context, @Nullable Object source) {
@@ -148,7 +148,7 @@ private static void registerBeanNameUrlHandlerMapping(ParserContext context, @Nu
148148
}
149149

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

205205
/**
206-
* Registers an {@link HandlerMappingIntrospector} under a well-known name
206+
* Registers an {@link HandlerMappingIntrospector} under a well-known name
207207
* unless already registered.
208208
*/
209209
private static void registerHandlerMappingIntrospector(ParserContext context, @Nullable Object source) {

spring-webmvc/src/main/java/org/springframework/web/servlet/function/RequestPredicates.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ public Optional<ServerResponse> checkNotModified(Instant lastModified, String et
11891189

11901190
@Override
11911191
public String toString() {
1192-
return method() + " " + path();
1192+
return method() + " " + path();
11931193
}
11941194
}
11951195

spring-webmvc/src/main/java/org/springframework/web/servlet/function/ServerRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ interface Builder {
501501

502502
/**
503503
* Add the given header value(s) under the given name.
504-
* @param headerName the header name
504+
* @param headerName the header name
505505
* @param headerValues the header value(s)
506506
* @return this builder
507507
* @see HttpHeaders#add(String, String)

spring-webmvc/src/main/java/org/springframework/web/servlet/function/ServerResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ interface SseBuilder {
635635
/**
636636
* Register a callback to be invoked when an error occurs during SSE
637637
* processing.
638-
* @param onError the callback to invoke on error
638+
* @param onError the callback to invoke on error
639639
* @return this builder
640640
*/
641641
SseBuilder onError(Consumer<Throwable> onError);

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/WebContentInterceptor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public void setPathMatcher(PathMatcher pathMatcher) {
155155
}
156156

157157
/**
158-
* Map settings for cache seconds to specific URL paths via patterns.
158+
* Map settings for cache seconds to specific URL paths via patterns.
159159
* <p>Overrides the default cache seconds setting of this interceptor.
160160
* Can specify "-1" to exclude a URL path from default caching.
161161
* <p>For pattern syntax see {@link AntPathMatcher} and {@link PathPattern}

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/condition/PatternsRequestCondition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public PatternsRequestCondition(String... patterns) {
8080
* {@link PathMatcher} and flag for matching trailing slashes.
8181
* @since 5.3
8282
*/
83-
public PatternsRequestCondition(String[] patterns, boolean useTrailingSlashMatch,
83+
public PatternsRequestCondition(String[] patterns, boolean useTrailingSlashMatch,
8484
@Nullable PathMatcher pathMatcher) {
8585

8686
this(patterns, null, pathMatcher, useTrailingSlashMatch);

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RedirectAttributesMethodArgumentResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public Object resolveArgument(MethodParameter parameter, @Nullable ModelAndViewC
6363
redirectAttributes = new RedirectAttributesModelMap(dataBinder);
6464
}
6565
else {
66-
redirectAttributes = new RedirectAttributesModelMap();
66+
redirectAttributes = new RedirectAttributesModelMap();
6767
}
6868
mavContainer.setRedirectModel(redirectAttributes);
6969
return redirectAttributes;

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/RequestAttributeMethodArgumentResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected Object resolveName(String name, MethodParameter parameter, NativeWebRe
5757
@Override
5858
protected void handleMissingValue(String name, MethodParameter parameter) throws ServletException {
5959
throw new ServletRequestBindingException("Missing request attribute '" + name +
60-
"' of type " + parameter.getNestedParameterType().getSimpleName());
60+
"' of type " + parameter.getNestedParameterType().getSimpleName());
6161
}
6262

6363
}

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ServletRequestDataBinderFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public ServletRequestDataBinderFactory(@Nullable List<InvocableHandlerMethod> bi
4949
*/
5050
@Override
5151
protected ServletRequestDataBinder createBinderInstance(
52-
@Nullable Object target, String objectName, NativeWebRequest request) throws Exception {
52+
@Nullable Object target, String objectName, NativeWebRequest request) throws Exception {
5353

5454
return new ExtendedServletRequestDataBinder(target, objectName);
5555
}

spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ protected ModelAndView handleAsyncRequestTimeoutException(AsyncRequestTimeoutExc
498498
* Handle an {@link ErrorResponse} exception.
499499
* <p>The default implementation sets status and the headers of the response
500500
* to those obtained from the {@code ErrorResponse}. If available, the
501-
* {@link ProblemDetail#getDetail()} is used as the message for
501+
* {@link ProblemDetail#getDetail()} is used as the message for
502502
* {@link HttpServletResponse#sendError(int, String)}.
503503
* @param errorResponse the exception to be handled
504504
* @param request current HTTP request

spring-webmvc/src/main/java/org/springframework/web/servlet/resource/DefaultServletHttpRequestHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
*
3636
* <p>This handler is intended to be used with a "/*" mapping when the
3737
* {@link org.springframework.web.servlet.DispatcherServlet DispatcherServlet}
38-
* is mapped to "/", thus overriding the Servlet container's default handling of static resources.
38+
* is mapped to "/", thus overriding the Servlet container's default handling of static resources.
3939
* The mapping to this handler should generally be ordered as the last in the chain so that it will
4040
* only execute when no other more specific mappings (i.e., to controllers) can be matched.
4141
*
@@ -45,7 +45,7 @@
4545
* handler checks at initialization time for the presence of the default Servlet of well-known
4646
* containers such as Tomcat, Jetty, Resin, WebLogic and WebSphere. However, when running in a
4747
* container where the default Servlet's name is not known, or where it has been customized
48-
* via server configuration, the {@code defaultServletName} will need to be set explicitly.
48+
* via server configuration, the {@code defaultServletName} will need to be set explicitly.
4949
*
5050
* @author Jeremy Grelle
5151
* @author Juergen Hoeller

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/HtmlEscapeTag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* The {@code <htmlEscape>} tag sets default HTML escape value for the current
23-
* page. The actual value can be overridden by escaping-aware tags.
23+
* page. The actual value can be overridden by escaping-aware tags.
2424
* The default is "false".
2525
*
2626
* <p>Note: You can also set a "defaultHtmlEscape" web.xml context-param.

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/UrlTag.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
* string.
5858
*
5959
* <p>Use of the spring:param tag for URI template variables is strongly recommended
60-
* over direct EL substitution as the values are URL encoded. Failure to properly
60+
* over direct EL substitution as the values are URL encoded. Failure to properly
6161
* encode URL can leave an application vulnerable to XSS and other injection attacks.
6262
*
6363
* <p>URLs can be HTML/XML escaped by setting the {@link #setHtmlEscape(boolean)
64-
* 'htmlEscape'} attribute to 'true'. Detects an HTML escaping setting, either on
64+
* 'htmlEscape'} attribute to 'true'. Detects an HTML escaping setting, either on
6565
* this tag instance, the page level, or the {@code web.xml} level. The default
66-
* is 'false'. When setting the URL value into a variable, escaping is not recommended.
66+
* is 'false'. When setting the URL value into a variable, escaping is not recommended.
6767
*
6868
* <p>Example usage:
6969
* <pre class="code">&lt;spring:url value="/url/path/{variableName}"&gt;

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/AbstractHtmlElementTag.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* across elements.
3434
*
3535
* <p>Additionally, this base class allows for rendering non-standard attributes
36-
* as part of the tag's output. These attributes are accessible to subclasses if
36+
* as part of the tag's output. These attributes are accessible to subclasses if
3737
* needed via the {@link AbstractHtmlElementTag#getDynamicAttributes() dynamicAttributes}
3838
* map.
3939
*

spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/OptionWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* the {@code labelProperty}). These properties are then used when
4444
* rendering each element of the array/{@link Collection} as an '{@code option}'.
4545
* If either property name is omitted, the value of {@link Object#toString()} of
46-
* the corresponding array/{@link Collection} element is used instead. However,
46+
* the corresponding array/{@link Collection} element is used instead. However,
4747
* if the item is an enum, {@link Enum#name()} is used as the default value.
4848
* </p>
4949
* <h3>Using a {@link Map}:</h3>

spring-webmvc/src/main/java/org/springframework/web/servlet/view/json/MappingJackson2JsonView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*
3939
* <p>By default, the entire contents of the model map (with the exception of framework-specific classes)
4040
* will be encoded as JSON. If the model contains only one key, you can have it extracted encoded as JSON
41-
* alone via {@link #setExtractValueFromSingleKeyModel}.
41+
* alone via {@link #setExtractValueFromSingleKeyModel}.
4242
*
4343
* <p>The default constructor uses the default configuration provided by {@link Jackson2ObjectMapperBuilder}.
4444
*

0 commit comments

Comments
 (0)