Skip to content

Commit 4143b44

Browse files
committed
Polishing
1 parent eefdd2c commit 4143b44

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

spring-context/src/test/resources/org/springframework/jmx/export/notificationPublisherTests.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55

66
<bean id="publisher" class="org.springframework.jmx.export.NotificationPublisherTests$MyNotificationPublisher"/>
77

8-
<bean id="publisherMBean" class="org.springframework.jmx.export.NotificationPublisherTests$MyNotificationPublisherMBean"/>
8+
<bean id="publisherMBean" class="org.springframework.jmx.export.NotificationPublisherTests$MyNotificationPublisherMBean"/>
99

10-
<bean id="publisherStandardMBean" class="org.springframework.jmx.export.NotificationPublisherTests$MyNotificationPublisherStandardMBean"/>
10+
<bean id="publisherStandardMBean" class="org.springframework.jmx.export.NotificationPublisherTests$MyNotificationPublisherStandardMBean"/>
1111

1212
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
1313
<property name="beans">
1414
<map>
1515
<entry key="spring:type=Publisher" value-ref="publisher"/>
16-
<entry key="spring:type=PublisherMBean" value-ref="publisherMBean"/>
17-
<entry key="spring:type=PublisherStandardMBean" value-ref="publisherStandardMBean"/>
16+
<entry key="spring:type=PublisherMBean" value-ref="publisherMBean"/>
17+
<entry key="spring:type=PublisherStandardMBean" value-ref="publisherStandardMBean"/>
1818
</map>
1919
</property>
2020
<property name="server" ref="server"/>

spring-core/src/main/java/org/springframework/core/convert/Property.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 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.
@@ -47,7 +47,7 @@
4747
*/
4848
public final class Property {
4949

50-
private static Map<Property, Annotation[]> annotationCache = new ConcurrentReferenceHashMap<>();
50+
private static final Map<Property, Annotation[]> annotationCache = new ConcurrentReferenceHashMap<>();
5151

5252
private final Class<?> objectType;
5353

spring-expression/src/main/java/org/springframework/expression/spel/ast/ConstructorReference.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ private TypedValue createArray(ExpressionState state) throws EvaluationException
288288
else {
289289
// There is an initializer
290290
if (this.dimensions == null || this.dimensions.length > 1) {
291-
// There is an initializer but this is a multi-dimensional array (e.g. new int[][]{{1,2},{3,4}}) - this
292-
// is not currently supported
291+
// There is an initializer but this is a multi-dimensional array (e.g. new int[][]{{1,2},{3,4}})
292+
// - this is not currently supported
293293
throw new SpelEvaluationException(getStartPosition(),
294294
SpelMessage.MULTIDIM_ARRAY_INITIALIZER_NOT_SUPPORTED);
295295
}

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

+6-5
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public void encode() throws Exception {
103103
);
104104
}
105105

106-
@Test // SPR-15866
106+
@Test // SPR-15866
107107
public void canEncodeWithCustomMimeType() {
108108
MimeType textJavascript = new MimeType("text", "javascript", StandardCharsets.UTF_8);
109109
Jackson2JsonEncoder encoder = new Jackson2JsonEncoder(new ObjectMapper(), textJavascript);
@@ -231,9 +231,8 @@ public void jacksonValue() {
231231
);
232232
}
233233

234-
@Test // gh-28045
234+
@Test // gh-28045
235235
public void jacksonValueUnwrappedBeforeObjectMapperSelection() {
236-
237236
JacksonViewBean bean = new JacksonViewBean();
238237
bean.setWithView1("with");
239238
bean.setWithView2("with");
@@ -248,13 +247,15 @@ public void jacksonValueUnwrappedBeforeObjectMapperSelection() {
248247
ObjectMapper mapper = new ObjectMapper().configure(SerializationFeature.INDENT_OUTPUT, true);
249248
this.encoder.registerObjectMappersForType(JacksonViewBean.class, map -> map.put(halMediaType, mapper));
250249

250+
String ls = System.lineSeparator(); // output below is different between Unix and Windows
251251
testEncode(Mono.just(jacksonValue), type, halMediaType, Collections.emptyMap(), step -> step
252-
.consumeNextWith(expectString("{\n \"withView1\" : \"with\"\n}").andThen(DataBufferUtils::release))
252+
.consumeNextWith(expectString("{" + ls + " \"withView1\" : \"with\"" + ls + "}")
253+
.andThen(DataBufferUtils::release))
253254
.verifyComplete()
254255
);
255256
}
256257

257-
@Test // gh-22771
258+
@Test // gh-22771
258259
public void encodeWithFlushAfterWriteOff() {
259260
ObjectMapper mapper = new ObjectMapper();
260261
mapper.configure(SerializationFeature.FLUSH_AFTER_WRITE_VALUE, false);

0 commit comments

Comments
 (0)