Skip to content

Commit bbf3c6e

Browse files
committed
Upgrade to Jackson 2.15
Closes gh-30665
1 parent ca4de8f commit bbf3c6e

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

Diff for: framework-platform/framework-platform.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ javaPlatform {
77
}
88

99
dependencies {
10-
api(platform("com.fasterxml.jackson:jackson-bom:2.14.3"))
10+
api(platform("com.fasterxml.jackson:jackson-bom:2.15.2"))
1111
api(platform("io.micrometer:micrometer-bom:1.10.8"))
1212
api(platform("io.netty:netty-bom:4.1.93.Final"))
1313
api(platform("io.netty:netty5-bom:5.0.0.Alpha5"))

Diff for: spring-web/src/test/java/org/springframework/http/codec/json/Jackson2TokenizerTests.java

+5-13
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-2023 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.
@@ -30,8 +30,6 @@
3030
import org.json.JSONException;
3131
import org.junit.jupiter.api.BeforeEach;
3232
import org.junit.jupiter.api.Test;
33-
import org.junit.jupiter.params.ParameterizedTest;
34-
import org.junit.jupiter.params.provider.ValueSource;
3533
import org.skyscreamer.jsonassert.JSONAssert;
3634
import reactor.core.publisher.Flux;
3735
import reactor.test.StepVerifier;
@@ -317,12 +315,11 @@ public void jsonEOFExceptionIsWrappedAsDecodingError() {
317315
.verify();
318316
}
319317

320-
@ParameterizedTest
321-
@ValueSource(booleans = {false, true})
322-
public void useBigDecimalForFloats(boolean useBigDecimalForFloats) {
318+
@Test
319+
public void useBigDecimalForFloats() {
323320
Flux<DataBuffer> source = Flux.just(stringBuffer("1E+2"));
324321
Flux<TokenBuffer> tokens = Jackson2Tokenizer.tokenize(
325-
source, this.jsonFactory, this.objectMapper, false, useBigDecimalForFloats, -1);
322+
source, this.jsonFactory, this.objectMapper, false, true, -1);
326323

327324
StepVerifier.create(tokens)
328325
.assertNext(tokenBuffer -> {
@@ -331,12 +328,7 @@ public void useBigDecimalForFloats(boolean useBigDecimalForFloats) {
331328
JsonToken token = parser.nextToken();
332329
assertThat(token).isEqualTo(JsonToken.VALUE_NUMBER_FLOAT);
333330
JsonParser.NumberType numberType = parser.getNumberType();
334-
if (useBigDecimalForFloats) {
335-
assertThat(numberType).isEqualTo(JsonParser.NumberType.BIG_DECIMAL);
336-
}
337-
else {
338-
assertThat(numberType).isEqualTo(JsonParser.NumberType.DOUBLE);
339-
}
331+
assertThat(numberType).isEqualTo(JsonParser.NumberType.BIG_DECIMAL);
340332
}
341333
catch (IOException ex) {
342334
fail(ex);

0 commit comments

Comments
 (0)