Skip to content

Commit 3926cc3

Browse files
committed
Merge branch '2.x' into 3.x
2 parents 65bd720 + 8432556 commit 3926cc3

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: ./mvnw -B -q -ff -ntp test
5656
- name: Publish code coverage
5757
if: ${{ matrix.release_build && github.event_name != 'pull_request' }}
58-
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
58+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
5959
with:
6060
token: ${{ secrets.CODECOV_TOKEN }}
6161
files: ./target/site/jacoco/jacoco.xml

afterburner/src/test/java/tools/jackson/module/afterburner/deser/convert/CoerceToBooleanTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99

1010
import com.fasterxml.jackson.annotation.JsonCreator;
1111
import com.fasterxml.jackson.annotation.JsonProperty;
12+
1213
import tools.jackson.core.JsonParser;
1314
import tools.jackson.core.JsonToken;
15+
import tools.jackson.core.StreamReadFeature;
1416

1517
import tools.jackson.databind.*;
1618
import tools.jackson.databind.cfg.CoercionAction;
@@ -55,6 +57,7 @@ public BooleanWrapper(@JsonProperty("ctor") Boolean foo) {
5557

5658
private final ObjectMapper LEGACY_NONCOERCING_MAPPER = afterburnerMapperBuilder()
5759
.disable(MapperFeature.ALLOW_COERCION_OF_SCALARS)
60+
.disable(StreamReadFeature.CLEAR_CURRENT_TOKEN_ON_CLOSE)
5861
.build();
5962

6063
private final ObjectMapper MAPPER_INT_TO_EMPTY = afterburnerMapperBuilder()
@@ -416,10 +419,10 @@ private void _verifyBooleanCoerceFailReason(MismatchedInputException e,
416419
{
417420
verifyException(e, "Cannot coerce ", "Cannot deserialize value of type ");
418421

422+
// 01-Jun-2025, tatu: Now available via exception
423+
assertToken(tokenType, e.getCurrentToken());
419424
JsonParser p = (JsonParser) e.processor();
420425

421-
assertToken(tokenType, p.currentToken());
422-
423426
final String text = p.getString();
424427
if (!tokenValue.equals(text)) {
425428
String textDesc = (text == null) ? "NULL" : quote(text);

blackbird/src/test/java/tools/jackson/module/blackbird/deser/convert/CoerceToBooleanTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99

1010
import com.fasterxml.jackson.annotation.JsonCreator;
1111
import com.fasterxml.jackson.annotation.JsonProperty;
12+
1213
import tools.jackson.core.JsonParser;
1314
import tools.jackson.core.JsonToken;
15+
import tools.jackson.core.StreamReadFeature;
1416

1517
import tools.jackson.databind.*;
1618
import tools.jackson.databind.cfg.CoercionAction;
@@ -55,6 +57,7 @@ public BooleanWrapper(@JsonProperty("ctor") Boolean foo) {
5557

5658
private final ObjectMapper LEGACY_NONCOERCING_MAPPER = blackbirdMapperBuilder()
5759
.disable(MapperFeature.ALLOW_COERCION_OF_SCALARS)
60+
.disable(StreamReadFeature.CLEAR_CURRENT_TOKEN_ON_CLOSE)
5861
.build();
5962

6063
private final ObjectMapper MAPPER_INT_TO_EMPTY = blackbirdMapperBuilder()
@@ -416,10 +419,10 @@ private void _verifyBooleanCoerceFailReason(MismatchedInputException e,
416419
{
417420
verifyException(e, "Cannot coerce ", "Cannot deserialize value of type ");
418421

419-
JsonParser p = (JsonParser) e.processor();
420-
421-
assertToken(tokenType, p.currentToken());
422+
// 01-Jun-2025, tatu: Now available via exception
423+
assertToken(tokenType, e.getCurrentToken());
422424

425+
JsonParser p = (JsonParser) e.processor();
423426
final String text = p.getString();
424427
if (!tokenValue.equals(text)) {
425428
String textDesc = (text == null) ? "NULL" : quote(text);

0 commit comments

Comments
 (0)