Skip to content

Commit a22d204

Browse files
committed
Remove duplicate words in Java source code
Discovered using regular expression: \b(\w+)\s+\1\b[^(}]
1 parent f27382c commit a22d204

File tree

10 files changed

+42
-42
lines changed

10 files changed

+42
-42
lines changed

Diff for: spring-beans/src/main/java/org/springframework/beans/factory/support/MethodOverrides.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -87,7 +87,7 @@ public boolean isEmpty() {
8787

8888
/**
8989
* Return the override for the given method, if any.
90-
* @param method method to check for overrides for
90+
* @param method the method to check for overrides for
9191
* @return the method override, or {@code null} if none
9292
*/
9393
@Nullable

Diff for: spring-beans/src/main/java/org/springframework/beans/factory/support/MethodReplacer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,7 +35,7 @@ public interface MethodReplacer {
3535
* @param obj the instance we're reimplementing the method for
3636
* @param method the method to reimplement
3737
* @param args arguments to the method
38-
* @return return value for the method
38+
* @return the return value for the method
3939
*/
4040
Object reimplement(Object obj, Method method, Object[] args) throws Throwable;
4141

Diff for: spring-beans/src/main/java/org/springframework/beans/factory/support/PropertiesBeanDefinitionReader.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -405,10 +405,10 @@ public int registerBeanDefinitions(Map<?, ?> map, @Nullable String prefix, Strin
405405
/**
406406
* Get all property values, given a prefix (which will be stripped)
407407
* and add the bean they define to the factory with the given name.
408-
* @param beanName name of the bean to define
408+
* @param beanName the name of the bean to define
409409
* @param map a Map containing string pairs
410-
* @param prefix prefix of each entry, which will be stripped
411-
* @param resourceDescription description of the resource that the
410+
* @param prefix the prefix of each entry, which will be stripped
411+
* @param resourceDescription the description of the resource that the
412412
* Map came from (for logging purposes)
413413
* @throws BeansException if the bean definition could not be parsed or registered
414414
*/

Diff for: spring-context/src/main/java/org/springframework/validation/method/MethodValidationResult.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -87,7 +87,7 @@ default List<? extends MessageSourceResolvable> getAllErrors() {
8787
* on their fields and properties.
8888
* @see #getValueResults()
8989
* @see #getBeanResults()
90-
* @deprecated deprecated in favor of {@link #getParameterValidationResults()}
90+
* @deprecated As of Spring Framework 6.2, in favor of {@link #getParameterValidationResults()}
9191
*/
9292
@Deprecated(since = "6.2", forRemoval = true)
9393
default List<ParameterValidationResult> getAllValidationResults() {

Diff for: spring-test/src/test/java/org/springframework/test/context/bean/override/mockito/MockitoBeanOverrideHandlerTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void isEqualToWithSameByNameLookupMetadataFromFieldAndClassLevel() {
126126
/**
127127
* Since the "field name as fallback qualifier" is not available for an annotated class,
128128
* what would seem to be "equivalent" handlers are actually not considered "equal" when
129-
* the the lookup is "by type".
129+
* the lookup is "by type".
130130
*/
131131
@Test // gh-33925
132132
void isNotEqualToWithSameByTypeLookupMetadataFromFieldAndClassLevel() {

Diff for: spring-web/src/main/java/org/springframework/web/context/ContextLoaderListener.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -91,7 +91,7 @@ public ContextLoaderListener(WebApplicationContext rootContext) {
9191
* <li>{@code ServletContext} and {@code ServletConfig} objects will be delegated to
9292
* the application context</li>
9393
* <li>{@link #customizeContext} will be called</li>
94-
* <li>Any {@link org.springframework.context.ApplicationContextInitializer ApplicationContextInitializer org.springframework.context.ApplicationContextInitializer ApplicationContextInitializers}
94+
* <li>Any {@link org.springframework.context.ApplicationContextInitializer ApplicationContextInitializers}
9595
* specified through the "contextInitializerClasses" init-param will be applied.</li>
9696
* <li>{@link org.springframework.context.ConfigurableApplicationContext#refresh refresh()} will be called</li>
9797
* </ul>

Diff for: spring-webflux/src/main/java/org/springframework/web/reactive/function/server/RouterFunctions.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -153,7 +153,7 @@ public static <T extends ServerResponse> RouterFunction<T> nest(
153153
* Resource resource = new ClassPathResource("static/index.html")
154154
* RouterFunction&lt;ServerResponse&gt; resources = RouterFunctions.resource(path("/api/**").negate(), resource);
155155
* </pre>
156-
* @param predicate predicate to match
156+
* @param predicate the predicate to match
157157
* @param resource the resources to serve
158158
* @return a router function that routes to a resource
159159
* @since 6.1.4
@@ -169,7 +169,7 @@ public static RouterFunction<ServerResponse> resource(RequestPredicate predicate
169169
* Resource resource = new ClassPathResource("static/index.html")
170170
* RouterFunction&lt;ServerResponse&gt; resources = RouterFunctions.resource(path("/api/**").negate(), resource);
171171
* </pre>
172-
* @param predicate predicate to match
172+
* @param predicate the predicate to match
173173
* @param resource the resources to serve
174174
* @param headersConsumer provides access to the HTTP headers for served resources
175175
* @return a router function that routes to a resource
@@ -384,7 +384,7 @@ public interface Builder {
384384
/**
385385
* Adds a route to the given handler function that handles all HTTP {@code GET} requests
386386
* that match the given predicate.
387-
* @param predicate predicate to match
387+
* @param predicate the predicate to match
388388
* @param handlerFunction the handler function to handle all {@code GET} requests that
389389
* match {@code predicate}
390390
* @return this builder
@@ -436,7 +436,7 @@ public interface Builder {
436436
/**
437437
* Adds a route to the given handler function that handles all HTTP {@code HEAD} requests
438438
* that match the given predicate.
439-
* @param predicate predicate to match
439+
* @param predicate the predicate to match
440440
* @param handlerFunction the handler function to handle all {@code HEAD} requests that
441441
* match {@code predicate}
442442
* @return this builder
@@ -479,7 +479,7 @@ public interface Builder {
479479
/**
480480
* Adds a route to the given handler function that handles all HTTP {@code POST} requests
481481
* that match the given predicate.
482-
* @param predicate predicate to match
482+
* @param predicate the predicate to match
483483
* @param handlerFunction the handler function to handle all {@code POST} requests that
484484
* match {@code predicate}
485485
* @return this builder
@@ -530,7 +530,7 @@ public interface Builder {
530530
/**
531531
* Adds a route to the given handler function that handles all HTTP {@code PUT} requests
532532
* that match the given predicate.
533-
* @param predicate predicate to match
533+
* @param predicate the predicate to match
534534
* @param handlerFunction the handler function to handle all {@code PUT} requests that
535535
* match {@code predicate}
536536
* @return this builder
@@ -581,7 +581,7 @@ public interface Builder {
581581
/**
582582
* Adds a route to the given handler function that handles all HTTP {@code PATCH} requests
583583
* that match the given predicate.
584-
* @param predicate predicate to match
584+
* @param predicate the predicate to match
585585
* @param handlerFunction the handler function to handle all {@code PATCH} requests that
586586
* match {@code predicate}
587587
* @return this builder
@@ -632,7 +632,7 @@ public interface Builder {
632632
/**
633633
* Adds a route to the given handler function that handles all HTTP {@code DELETE} requests
634634
* that match the given predicate.
635-
* @param predicate predicate to match
635+
* @param predicate the predicate to match
636636
* @param handlerFunction the handler function to handle all {@code DELETE} requests that
637637
* match {@code predicate}
638638
* @return this builder
@@ -675,7 +675,7 @@ public interface Builder {
675675
/**
676676
* Adds a route to the given handler function that handles all HTTP {@code OPTIONS} requests
677677
* that match the given predicate.
678-
* @param predicate predicate to match
678+
* @param predicate the predicate to match
679679
* @param handlerFunction the handler function to handle all {@code OPTIONS} requests that
680680
* match {@code predicate}
681681
* @return this builder
@@ -735,7 +735,7 @@ public interface Builder {
735735
* Resource resource = new ClassPathResource("static/index.html")
736736
* RouterFunction&lt;ServerResponse&gt; resources = RouterFunctions.resource(path("/api/**").negate(), resource);
737737
* </pre>
738-
* @param predicate predicate to match
738+
* @param predicate the predicate to match
739739
* @param resource the resources to serve
740740
* @return a router function that routes to a resource
741741
* @since 6.1.4
@@ -749,7 +749,7 @@ public interface Builder {
749749
* Resource resource = new ClassPathResource("static/index.html")
750750
* RouterFunction&lt;ServerResponse&gt; resources = RouterFunctions.resource(path("/api/**").negate(), resource);
751751
* </pre>
752-
* @param predicate predicate to match
752+
* @param predicate the predicate to match
753753
* @param resource the resources to serve
754754
* @param headersConsumer provides access to the HTTP headers for served resources
755755
* @return a router function that routes to a resource

Diff for: spring-webmvc/src/main/java/org/springframework/web/servlet/function/RouterFunctions.java

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -136,7 +136,7 @@ public static <T extends ServerResponse> RouterFunction<T> nest(
136136
* Resource resource = new ClassPathResource("static/index.html")
137137
* RouterFunction&lt;ServerResponse&gt; resources = RouterFunctions.resource(path("/api/**").negate(), resource);
138138
* </pre>
139-
* @param predicate predicate to match
139+
* @param predicate the predicate to match
140140
* @param resource the resources to serve
141141
* @return a router function that routes to a resource
142142
* @since 6.1.4
@@ -152,7 +152,7 @@ public static RouterFunction<ServerResponse> resource(RequestPredicate predicate
152152
* Resource resource = new ClassPathResource("static/index.html")
153153
* RouterFunction&lt;ServerResponse&gt; resources = RouterFunctions.resource(path("/api/**").negate(), resource);
154154
* </pre>
155-
* @param predicate predicate to match
155+
* @param predicate the predicate to match
156156
* @param resource the resources to serve
157157
* @param headersConsumer provides access to the HTTP headers for served resources
158158
* @return a router function that routes to a resource
@@ -298,7 +298,7 @@ public interface Builder {
298298
/**
299299
* Adds a route to the given handler function that handles all HTTP {@code GET} requests
300300
* that match the given predicate.
301-
* @param predicate predicate to match
301+
* @param predicate the predicate to match
302302
* @param handlerFunction the handler function to handle all {@code GET} requests that
303303
* match {@code predicate}
304304
* @return this builder
@@ -350,7 +350,7 @@ public interface Builder {
350350
/**
351351
* Adds a route to the given handler function that handles all HTTP {@code HEAD} requests
352352
* that match the given predicate.
353-
* @param predicate predicate to match
353+
* @param predicate the predicate to match
354354
* @param handlerFunction the handler function to handle all {@code HEAD} requests that
355355
* match {@code predicate}
356356
* @return this builder
@@ -393,7 +393,7 @@ public interface Builder {
393393
/**
394394
* Adds a route to the given handler function that handles all HTTP {@code POST} requests
395395
* that match the given predicate.
396-
* @param predicate predicate to match
396+
* @param predicate the predicate to match
397397
* @param handlerFunction the handler function to handle all {@code POST} requests that
398398
* match {@code predicate}
399399
* @return this builder
@@ -444,7 +444,7 @@ public interface Builder {
444444
/**
445445
* Adds a route to the given handler function that handles all HTTP {@code PUT} requests
446446
* that match the given predicate.
447-
* @param predicate predicate to match
447+
* @param predicate the predicate to match
448448
* @param handlerFunction the handler function to handle all {@code PUT} requests that
449449
* match {@code predicate}
450450
* @return this builder
@@ -495,7 +495,7 @@ public interface Builder {
495495
/**
496496
* Adds a route to the given handler function that handles all HTTP {@code PATCH} requests
497497
* that match the given predicate.
498-
* @param predicate predicate to match
498+
* @param predicate the predicate to match
499499
* @param handlerFunction the handler function to handle all {@code PATCH} requests that
500500
* match {@code predicate}
501501
* @return this builder
@@ -546,7 +546,7 @@ public interface Builder {
546546
/**
547547
* Adds a route to the given handler function that handles all HTTP {@code DELETE} requests
548548
* that match the given predicate.
549-
* @param predicate predicate to match
549+
* @param predicate the predicate to match
550550
* @param handlerFunction the handler function to handle all {@code DELETE} requests that
551551
* match {@code predicate}
552552
* @return this builder
@@ -589,7 +589,7 @@ public interface Builder {
589589
/**
590590
* Adds a route to the given handler function that handles all HTTP {@code OPTIONS} requests
591591
* that match the given predicate.
592-
* @param predicate predicate to match
592+
* @param predicate the predicate to match
593593
* @param handlerFunction the handler function to handle all {@code OPTIONS} requests that
594594
* match {@code predicate}
595595
* @return this builder
@@ -648,7 +648,7 @@ public interface Builder {
648648
* Resource resource = new ClassPathResource("static/index.html")
649649
* RouterFunction&lt;ServerResponse&gt; resources = RouterFunctions.resource(path("/api/**").negate(), resource);
650650
* </pre>
651-
* @param predicate predicate to match
651+
* @param predicate the predicate to match
652652
* @param resource the resources to serve
653653
* @return a router function that routes to a resource
654654
* @since 6.1.4
@@ -662,7 +662,7 @@ public interface Builder {
662662
* Resource resource = new ClassPathResource("static/index.html")
663663
* RouterFunction&lt;ServerResponse&gt; resources = RouterFunctions.resource(path("/api/**").negate(), resource);
664664
* </pre>
665-
* @param predicate predicate to match
665+
* @param predicate the predicate to match
666666
* @param resource the resources to serve
667667
* @param headersConsumer provides access to the HTTP headers for served resources
668668
* @return a router function that routes to a resource

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static ServerResponse async(Object asyncResponse, Duration timeout) {
290290
* .send("Hello World!"));
291291
* }
292292
* </pre>
293-
* @param consumer consumer that will be provided with an event builder
293+
* @param consumer the consumer that will be provided with an event builder
294294
* @return the server-side event response
295295
* @since 5.3.2
296296
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>
@@ -319,8 +319,8 @@ static ServerResponse sse(Consumer<SseBuilder> consumer) {
319319
* .send("Hello World!"));
320320
* }
321321
* </pre>
322-
* @param consumer consumer that will be provided with an event builder
323-
* @param timeout maximum time period to wait before timing out
322+
* @param consumer the consumer that will be provided with an event builder
323+
* @param timeout maximum time period to wait before timing out
324324
* @return the server-side event response
325325
* @since 5.3.2
326326
* @see <a href="https://html.spec.whatwg.org/multipage/server-sent-events.html">Server-Sent Events</a>
@@ -338,7 +338,7 @@ interface HeadersBuilder<B extends HeadersBuilder<B>> {
338338

339339
/**
340340
* Add the given header value(s) under the given name.
341-
* @param headerName the header name
341+
* @param headerName the header name
342342
* @param headerValues the header value(s)
343343
* @return this builder
344344
* @see HttpHeaders#add(String, String)

Diff for: spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/method/annotation/ResponseBodyEmitterReturnValueHandler.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public ResponseBodyEmitterReturnValueHandler(List<HttpMessageConverter<?>> messa
135135
* @param executor for blocking I/O writes of items emitted from reactive types
136136
* @param manager for detecting streaming media types
137137
* @param viewResolvers resolvers for fragment stream rendering
138-
* @param localeResolver localeResolver for fragment stream rendering
138+
* @param localeResolver the {@link LocaleResolver} for fragment stream rendering
139139
* @since 6.2
140140
*/
141141
public ResponseBodyEmitterReturnValueHandler(

0 commit comments

Comments
 (0)