Skip to content

Commit 3ba9d35

Browse files
izeyesbrannen
authored andcommitted
Polish
Closes gh-33566
1 parent 6120076 commit 3ba9d35

File tree

12 files changed

+21
-28
lines changed

12 files changed

+21
-28
lines changed

framework-docs/modules/ROOT/pages/core/validation/beanvalidation.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ To customize the default message, you can add properties to
385385
xref:core/beans/context-introduction.adoc#context-functionality-messagesource[MessageSource]
386386
resource bundles using any of the above errors codes and message arguments. Note also that the
387387
message argument `"name"` is itself a `MessageSourceResolvable` with error codes
388-
`"person.name"` and `"name"` and can customized too. For example:
388+
`"person.name"` and `"name"` and can be customized too. For example:
389389

390390
Properties::
391391
+

spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
160160
/** Map from scope identifier String to corresponding Scope. */
161161
private final Map<String, Scope> scopes = new LinkedHashMap<>(8);
162162

163-
/** Application startup metrics. **/
163+
/** Application startup metrics. */
164164
private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT;
165165

166166
/** Map from bean name to merged RootBeanDefinition. */

spring-context/src/main/java/org/springframework/context/support/AbstractApplicationContext.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public abstract class AbstractApplicationContext extends DefaultResourceLoader
234234
@Nullable
235235
private ApplicationEventMulticaster applicationEventMulticaster;
236236

237-
/** Application startup metrics. **/
237+
/** Application startup metrics. */
238238
private ApplicationStartup applicationStartup = ApplicationStartup.DEFAULT;
239239

240240
/** Statically specified listeners. */

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/reactive/ChannelSendOperator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ private enum State {
107107
* The write subscriber has subscribed, and cached signals have been
108108
* emitted to it; we're ready to switch to a simple pass-through mode
109109
* for all remaining signals.
110-
**/
110+
*/
111111
READY_TO_WRITE
112112

113113
}

spring-test/src/main/java/org/springframework/mock/web/MockCookie.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class MockCookie extends Cookie {
4545

4646
private static final String SAME_SITE = "SameSite";
4747
private static final String EXPIRES = "Expires";
48+
private static final String PARTITIONED = "Partitioned";
4849

4950
@Nullable
5051
private ZonedDateTime expires;
@@ -105,10 +106,10 @@ public String getSameSite() {
105106
*/
106107
public void setPartitioned(boolean partitioned) {
107108
if (partitioned) {
108-
setAttribute("Partitioned", "");
109+
setAttribute(PARTITIONED, "");
109110
}
110111
else {
111-
setAttribute("Partitioned", null);
112+
setAttribute(PARTITIONED, null);
112113
}
113114
}
114115

@@ -118,7 +119,7 @@ public void setPartitioned(boolean partitioned) {
118119
* @see <a href="https://datatracker.ietf.org/doc/html/draft-cutler-httpbis-partitioned-cookies#section-2.1">The Partitioned attribute spec</a>
119120
*/
120121
public boolean isPartitioned() {
121-
return getAttribute("Partitioned") != null;
122+
return getAttribute(PARTITIONED) != null;
122123
}
123124

124125
/**
@@ -207,7 +208,7 @@ public String toString() {
207208
.append("Comment", getComment())
208209
.append("Secure", getSecure())
209210
.append("HttpOnly", isHttpOnly())
210-
.append("Partitioned", isPartitioned())
211+
.append(PARTITIONED, isPartitioned())
211212
.append(SAME_SITE, getSameSite())
212213
.append("Max-Age", getMaxAge())
213214
.append(EXPIRES, getAttribute(EXPIRES))

spring-web/src/main/java/org/springframework/http/client/reactive/JdkClientHttpConnector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class JdkClientHttpConnector implements ClientHttpConnector {
5151
private DataBufferFactory bufferFactory = DefaultDataBufferFactory.sharedInstance;
5252

5353
@Nullable
54-
private Duration readTimeout = null;
54+
private Duration readTimeout;
5555

5656

5757
/**

spring-web/src/main/java/org/springframework/http/server/reactive/ChannelSendOperator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ private enum State {
9999
* The write subscriber has subscribed, and cached signals have been
100100
* emitted to it; we're ready to switch to a simple pass-through mode
101101
* for all remaining signals.
102-
**/
102+
*/
103103
READY_TO_WRITE
104104

105105
}

spring-web/src/main/java/org/springframework/web/context/request/RequestAttributesThreadLocalAccessor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ public void setValue() {
7070

7171
/**
7272
* ServletRequestAttributes that takes another instance, and makes a copy of the
73-
* request attributes at present to provides extended read access during async
73+
* request attributes at present to provide extended read access during async
7474
* handling when the DispatcherServlet has exited from the initial REQUEST dispatch
7575
* and marked the request {@link ServletRequestAttributes#requestCompleted()}.
76-
* <p>Note that beyond access to request attributes, here is no attempt to support
76+
* <p>Note that beyond access to request attributes, there is no attempt to support
7777
* setting or removing request attributes, nor to access session attributes after
7878
* the initial REQUEST dispatch has exited.
7979
*/

spring-web/src/test/java/org/springframework/http/codec/json/Jackson2JsonDecoderTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected void decodeToMono() {
174174
}
175175

176176
@Test
177-
protected void decodeToFluxWithListElements() {
177+
void decodeToFluxWithListElements() {
178178
Flux<DataBuffer> input = Flux.concat(
179179
stringBuffer("[{\"bar\":\"b1\",\"foo\":\"f1\"},{\"bar\":\"b2\",\"foo\":\"f2\"}]"),
180180
stringBuffer("[{\"bar\":\"b3\",\"foo\":\"f3\"},{\"bar\":\"b4\",\"foo\":\"f4\"}]"));

spring-web/src/test/java/org/springframework/web/util/ContentCachingRequestWrapperTests.java

+1-10
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@
1717
package org.springframework.web.util;
1818

1919
import java.io.UnsupportedEncodingException;
20-
import java.lang.reflect.Field;
2120
import java.nio.charset.StandardCharsets;
2221

2322
import org.junit.jupiter.api.Test;
2423

2524
import org.springframework.http.HttpMethod;
2625
import org.springframework.http.MediaType;
27-
import org.springframework.util.FastByteArrayOutputStream;
28-
import org.springframework.util.ReflectionUtils;
2926
import org.springframework.web.testfixture.servlet.MockHttpServletRequest;
3027

3128
import static org.assertj.core.api.Assertions.assertThat;
@@ -95,13 +92,7 @@ void cachedContentToStringWithLimit() throws Exception {
9592
@Test
9693
void shouldNotAllocateMoreThanCacheLimit() throws Exception {
9794
ContentCachingRequestWrapper wrapper = new ContentCachingRequestWrapper(createGetRequest("Hello World"), CONTENT_CACHE_LIMIT);
98-
Field field = ReflectionUtils.findField(ContentCachingRequestWrapper.class, "cachedContent");
99-
ReflectionUtils.makeAccessible(field);
100-
FastByteArrayOutputStream cachedContent = (FastByteArrayOutputStream) ReflectionUtils.getField(field, wrapper);
101-
field = ReflectionUtils.findField(FastByteArrayOutputStream.class, "initialBlockSize");
102-
ReflectionUtils.makeAccessible(field);
103-
int blockSize = (int) ReflectionUtils.getField(field, cachedContent);
104-
assertThat(blockSize).isEqualTo(CONTENT_CACHE_LIMIT);
95+
assertThat(wrapper).extracting("cachedContent.initialBlockSize").isEqualTo(CONTENT_CACHE_LIMIT);
10596
}
10697

10798

spring-web/src/testFixtures/java/org/springframework/web/testfixture/servlet/MockCookie.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public class MockCookie extends Cookie {
4545

4646
private static final String SAME_SITE = "SameSite";
4747
private static final String EXPIRES = "Expires";
48+
private static final String PARTITIONED = "Partitioned";
4849

4950
@Nullable
5051
private ZonedDateTime expires;
@@ -105,10 +106,10 @@ public String getSameSite() {
105106
*/
106107
public void setPartitioned(boolean partitioned) {
107108
if (partitioned) {
108-
setAttribute("Partitioned", "");
109+
setAttribute(PARTITIONED, "");
109110
}
110111
else {
111-
setAttribute("Partitioned", null);
112+
setAttribute(PARTITIONED, null);
112113
}
113114
}
114115

@@ -118,7 +119,7 @@ public void setPartitioned(boolean partitioned) {
118119
* @see <a href="https://datatracker.ietf.org/doc/html/draft-cutler-httpbis-partitioned-cookies#section-2.1">The Partitioned attribute spec</a>
119120
*/
120121
public boolean isPartitioned() {
121-
return getAttribute("Partitioned") != null;
122+
return getAttribute(PARTITIONED) != null;
122123
}
123124

124125
/**
@@ -202,7 +203,7 @@ public String toString() {
202203
.append("Comment", getComment())
203204
.append("Secure", getSecure())
204205
.append("HttpOnly", isHttpOnly())
205-
.append("Partitioned", isPartitioned())
206+
.append(PARTITIONED, isPartitioned())
206207
.append(SAME_SITE, getSameSite())
207208
.append("Max-Age", getMaxAge())
208209
.append(EXPIRES, getAttribute(EXPIRES))

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* Abstract base class for URL-based views. Provides a consistent way of
26-
* holding the URL that a View wraps, in the form of an "url" bean property.
26+
* holding the URL that a View wraps, in the form of a "url" bean property.
2727
*
2828
* @author Juergen Hoeller
2929
* @since 13.12.2003

0 commit comments

Comments
 (0)