Skip to content

Commit 79738d9

Browse files
committed
Upgrade to Jackson 3.0.0-rc10
See gh-35521
1 parent 33897bb commit 79738d9

File tree

8 files changed

+28
-28
lines changed

8 files changed

+28
-28
lines changed

framework-platform/framework-platform.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies {
2121
api(platform("org.jetbrains.kotlinx:kotlinx-serialization-bom:1.9.0"))
2222
api(platform("org.junit:junit-bom:5.13.4"))
2323
api(platform("org.mockito:mockito-bom:5.19.0"))
24-
api(platform("tools.jackson:jackson-bom:3.0.0-rc9"))
24+
api(platform("tools.jackson:jackson-bom:3.0.0-rc10"))
2525

2626
constraints {
2727
api("com.fasterxml:aalto-xml:1.3.3")

spring-jms/src/test/java/org/springframework/jms/support/converter/JacksonJsonMessageConverterTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ void toTextMessageWithReturnType() throws JMSException, NoSuchMethodException {
181181
@Test
182182
void toTextMessageWithNullReturnType() throws JMSException, NoSuchMethodException {
183183
testToTextMessageWithReturnType(null);
184-
verify(sessionMock).createTextMessage("{\"description\":\"lengthy description\",\"name\":\"test\"}");
184+
verify(sessionMock).createTextMessage("{\"name\":\"test\",\"description\":\"lengthy description\"}");
185185
}
186186

187187
@Test
@@ -190,7 +190,7 @@ void toTextMessageWithReturnTypeAndNoJsonView() throws JMSException, NoSuchMetho
190190
MethodParameter returnType = new MethodParameter(method, -1);
191191

192192
testToTextMessageWithReturnType(returnType);
193-
verify(sessionMock).createTextMessage("{\"description\":\"lengthy description\",\"name\":\"test\"}");
193+
verify(sessionMock).createTextMessage("{\"name\":\"test\",\"description\":\"lengthy description\"}");
194194
}
195195

196196
@Test
@@ -237,7 +237,7 @@ void toTextMessageWithAnotherJsonViewClass() throws JMSException {
237237

238238
converter.toMessage(bean, sessionMock, Full.class);
239239
verify(textMessageMock).setStringProperty("__typeid__", MyAnotherBean.class.getName());
240-
verify(sessionMock).createTextMessage("{\"description\":\"lengthy description\",\"name\":\"test\"}");
240+
verify(sessionMock).createTextMessage("{\"name\":\"test\",\"description\":\"lengthy description\"}");
241241
}
242242

243243

spring-messaging/src/main/java/org/springframework/messaging/simp/user/MultiServerUserRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public UserRegistrySnapshot() {
209209
/**
210210
* Constructor to create DTO from a local user registry.
211211
*/
212-
public UserRegistrySnapshot(String id, SimpUserRegistry registry) {
212+
UserRegistrySnapshot(String id, SimpUserRegistry registry) {
213213
this.id = id;
214214
Set<SimpUser> users = registry.getUsers();
215215
this.users = CollectionUtils.newHashMap(users.size());

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@ void writePojo(DataBufferFactory bufferFactory) {
151151

152152
StepVerifier.create(outputMessage.getBody())
153153
.consumeNextWith(stringConsumer("data:"))
154-
.consumeNextWith(stringConsumer("{\"bar\":\"barbar\",\"foo\":\"foofoo\"}"))
154+
.consumeNextWith(stringConsumer("{\"foo\":\"foofoo\",\"bar\":\"barbar\"}"))
155155
.consumeNextWith(stringConsumer("\n\n"))
156156
.consumeNextWith(stringConsumer("data:"))
157-
.consumeNextWith(stringConsumer("{\"bar\":\"barbarbar\",\"foo\":\"foofoofoo\"}"))
157+
.consumeNextWith(stringConsumer("{\"foo\":\"foofoofoo\",\"bar\":\"barbarbar\"}"))
158158
.consumeNextWith(stringConsumer("\n\n"))
159159
.expectComplete()
160160
.verify();
@@ -175,15 +175,15 @@ void writePojoWithPrettyPrint(DataBufferFactory bufferFactory) {
175175
.consumeNextWith(stringConsumer("data:"))
176176
.consumeNextWith(stringConsumer("""
177177
{
178-
data: "bar" : "barbar",
179-
data: "foo" : "foofoo"
178+
data: "foo" : "foofoo",
179+
data: "bar" : "barbar"
180180
data:}"""))
181181
.consumeNextWith(stringConsumer("\n\n"))
182182
.consumeNextWith(stringConsumer("data:"))
183183
.consumeNextWith(stringConsumer("""
184184
{
185-
data: "bar" : "barbarbar",
186-
data: "foo" : "foofoofoo"
185+
data: "foo" : "foofoofoo",
186+
data: "bar" : "barbarbar"
187187
data:}"""))
188188
.consumeNextWith(stringConsumer("\n\n"))
189189
.expectComplete()
@@ -203,7 +203,7 @@ void writePojoWithCustomEncoding(DataBufferFactory bufferFactory) {
203203
assertThat(outputMessage.getHeaders().getContentType()).isEqualTo(mediaType);
204204
StepVerifier.create(outputMessage.getBody())
205205
.consumeNextWith(stringConsumer("data:", charset))
206-
.consumeNextWith(stringConsumer("{\"bar\":\"bar\uD834\uDD1E\",\"foo\":\"foo\uD834\uDD1E\"}", charset))
206+
.consumeNextWith(stringConsumer("{\"foo\":\"foo\uD834\uDD1E\",\"bar\":\"bar\uD834\uDD1E\"}", charset))
207207
.consumeNextWith(stringConsumer("\n\n", charset))
208208
.expectComplete()
209209
.verify();

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ public void encode() throws Exception {
9898
new Pojo("foofoofoo", "barbarbar"));
9999

100100
testEncodeAll(input, ResolvableType.forClass(Pojo.class), APPLICATION_NDJSON, null, step -> step
101-
.consumeNextWith(expectString("{\"bar\":\"bar\",\"foo\":\"foo\"}\n"))
102-
.consumeNextWith(expectString("{\"bar\":\"barbar\",\"foo\":\"foofoo\"}\n"))
103-
.consumeNextWith(expectString("{\"bar\":\"barbarbar\",\"foo\":\"foofoofoo\"}\n"))
101+
.consumeNextWith(expectString("{\"foo\":\"foo\",\"bar\":\"bar\"}\n"))
102+
.consumeNextWith(expectString("{\"foo\":\"foofoo\",\"bar\":\"barbar\"}\n"))
103+
.consumeNextWith(expectString("{\"foo\":\"foofoofoo\",\"bar\":\"barbarbar\"}\n"))
104104
.verifyComplete()
105105
);
106106
}
@@ -137,9 +137,9 @@ void encodeNonStream() {
137137
);
138138

139139
testEncode(input, Pojo.class, step -> step
140-
.consumeNextWith(expectString("[{\"bar\":\"bar\",\"foo\":\"foo\"}"))
141-
.consumeNextWith(expectString(",{\"bar\":\"barbar\",\"foo\":\"foofoo\"}"))
142-
.consumeNextWith(expectString(",{\"bar\":\"barbarbar\",\"foo\":\"foofoofoo\"}"))
140+
.consumeNextWith(expectString("[{\"foo\":\"foo\",\"bar\":\"bar\"}"))
141+
.consumeNextWith(expectString(",{\"foo\":\"foofoo\",\"bar\":\"barbar\"}"))
142+
.consumeNextWith(expectString(",{\"foo\":\"foofoofoo\",\"bar\":\"barbarbar\"}"))
143143
.consumeNextWith(expectString("]"))
144144
.verifyComplete());
145145
}
@@ -187,9 +187,9 @@ public void encodeStreamWithCustomStreamingType() {
187187
);
188188

189189
testEncode(input, ResolvableType.forClass(Pojo.class), barMediaType, null, step -> step
190-
.consumeNextWith(expectString("{\"bar\":\"bar\",\"foo\":\"foo\"}\n"))
191-
.consumeNextWith(expectString("{\"bar\":\"barbar\",\"foo\":\"foofoo\"}\n"))
192-
.consumeNextWith(expectString("{\"bar\":\"barbarbar\",\"foo\":\"foofoofoo\"}\n"))
190+
.consumeNextWith(expectString("{\"foo\":\"foo\",\"bar\":\"bar\"}\n"))
191+
.consumeNextWith(expectString("{\"foo\":\"foofoo\",\"bar\":\"barbar\"}\n"))
192+
.consumeNextWith(expectString("{\"foo\":\"foofoofoo\",\"bar\":\"barbarbar\"}\n"))
193193
.verifyComplete()
194194
);
195195
}
@@ -237,7 +237,7 @@ public void encodeWithFlushAfterWriteOff() {
237237
ResolvableType.forClass(Pojo.class), MimeTypeUtils.APPLICATION_JSON, Collections.emptyMap());
238238

239239
StepVerifier.create(result)
240-
.consumeNextWith(expectString("[{\"bar\":\"bar\",\"foo\":\"foo\"}"))
240+
.consumeNextWith(expectString("[{\"foo\":\"foo\",\"bar\":\"bar\"}"))
241241
.consumeNextWith(expectString("]"))
242242
.expectComplete()
243243
.verify(Duration.ofSeconds(5));
@@ -249,7 +249,7 @@ void encodeAscii() {
249249
MimeType mimeType = new MimeType("application", "json", StandardCharsets.US_ASCII);
250250

251251
testEncode(input, ResolvableType.forClass(Pojo.class), mimeType, null, step -> step
252-
.consumeNextWith(expectString("{\"bar\":\"bar\",\"foo\":\"foo\"}"))
252+
.consumeNextWith(expectString("{\"foo\":\"foo\",\"bar\":\"bar\"}"))
253253
.verifyComplete()
254254
);
255255
}

spring-web/src/test/java/org/springframework/web/client/RestClientIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ void postPojoAsJson(ClientHttpRequestFactory requestFactory) throws IOException
528528
expectRequestCount(1);
529529
expectRequest(request -> {
530530
assertThat(request.getTarget()).isEqualTo("/pojo/capitalize");
531-
assertThat(request.getBody().utf8()).isEqualTo("{\"bar\":\"barbar\",\"foo\":\"foofoo\"}");
531+
assertThat(request.getBody().utf8()).isEqualTo("{\"foo\":\"foofoo\",\"bar\":\"barbar\"}");
532532
assertThat(request.getHeaders().get(HttpHeaders.ACCEPT)).isEqualTo("application/json");
533533
assertThat(request.getHeaders().get(HttpHeaders.CONTENT_TYPE)).isEqualTo("application/json");
534534
});

spring-webflux/src/test/java/org/springframework/web/reactive/function/BodyInsertersTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ void ofObject() {
140140
StepVerifier.create(result).expectComplete().verify();
141141

142142
StepVerifier.create(response.getBodyAsString())
143-
.expectNext("{\"password\":\"bar\",\"username\":\"foo\"}")
143+
.expectNext("{\"username\":\"foo\",\"password\":\"bar\"}")
144144
.expectComplete()
145145
.verify();
146146
}
@@ -169,7 +169,7 @@ void ofProducerWithMono() {
169169
Mono<Void> result = inserter.insert(response, this.context);
170170
StepVerifier.create(result).expectComplete().verify();
171171
StepVerifier.create(response.getBodyAsString())
172-
.expectNext("{\"password\":\"bar\",\"username\":\"foo\"}")
172+
.expectNext("{\"username\":\"foo\",\"password\":\"bar\"}")
173173
.expectComplete()
174174
.verify();
175175
}
@@ -200,7 +200,7 @@ void ofProducerWithSingle() {
200200
Mono<Void> result = inserter.insert(response, this.context);
201201
StepVerifier.create(result).expectComplete().verify();
202202
StepVerifier.create(response.getBodyAsString())
203-
.expectNext("{\"password\":\"bar\",\"username\":\"foo\"}")
203+
.expectNext("{\"username\":\"foo\",\"password\":\"bar\"}")
204204
.expectComplete()
205205
.verify();
206206
}

spring-webflux/src/test/java/org/springframework/web/reactive/function/client/WebClientIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ void postPojoAsJson(ClientHttpConnector connector) throws IOException {
779779
expectRequestCount(1);
780780
expectRequest(request -> {
781781
assertThat(request.getTarget()).isEqualTo("/pojo/capitalize");
782-
assertThat(request.getBody().utf8()).isEqualTo("{\"bar\":\"barbar\",\"foo\":\"foofoo\"}");
782+
assertThat(request.getBody().utf8()).isEqualTo("{\"foo\":\"foofoo\",\"bar\":\"barbar\"}");
783783
assertThat(request.getHeaders().get(HttpHeaders.CONTENT_LENGTH)).isEqualTo("31");
784784
assertThat(request.getHeaders().get(HttpHeaders.ACCEPT)).isEqualTo("application/json");
785785
assertThat(request.getHeaders().get(HttpHeaders.CONTENT_TYPE)).isEqualTo("application/json");

0 commit comments

Comments
 (0)