Skip to content

Commit 78177ac

Browse files
committed
Merge branch '3.0' into 3.x
2 parents 67f8ef7 + e232ef1 commit 78177ac

File tree

3 files changed

+81
-4
lines changed

3 files changed

+81
-4
lines changed

release-notes/VERSION-2.x

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Project: jackson-databind
1616
customizability
1717
(contributed by @wrongwrong)
1818

19-
2.20.1 (not yet released)
19+
2.20.1 (30-Oct-2025)
2020

2121
#5292: `MapperFeature.FIX_FIELD_NAME_UPPER_CASE_PREFIX` does not work with
2222
Constructor parameters
@@ -71,6 +71,11 @@ Project: jackson-databind
7171
with `ObjectMapper`, prepare for 3.0)
7272
- Generate SBOMs [JSTEP-14]
7373
74+
2.19.4 (29-Oct-2025)
75+
2.19.3 (29-Oct-2025)
76+
77+
No changes since 2.19.2
78+
7479
2.19.2 (18-Jul-2025)
7580
7681
#5202: `JsonSetter.contentNulls` ignored for `Object[]`, `String[]`
@@ -175,6 +180,10 @@ Project: jackson-databind
175180
#5069: Add copy-constructor for `MappingIterator`
176181
(contributed by @wrongwrong)
177182

183+
2.18.5 (27-Oct-2025)
184+
185+
No changes since 2.18.4
186+
178187
2.18.4 (06-May-2025)
179188

180189
#4628: `@JsonIgnore` and `@JsonProperty.access=READ_ONLY` on Record property

src/test/java/tools/jackson/databind/misc/ParsingContext2525Test.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package tools.jackson.databind.misc;
22

3-
import java.io.IOException;
4-
53
import org.junit.jupiter.api.Test;
64

75
import tools.jackson.core.*;
@@ -72,7 +70,7 @@ public void testFullDocWithBuffer() throws Exception
7270
}
7371
}
7472

75-
private TokenBuffer _readAsTokenBuffer(String doc) throws IOException
73+
private TokenBuffer _readAsTokenBuffer(String doc)
7674
{
7775
try (JsonParser p = MAPPER.createParser(doc)) {
7876
p.nextToken();
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
package tools.jackson.databind.misc;
2+
3+
import java.io.StringReader;
4+
import java.io.ByteArrayInputStream;
5+
import java.nio.charset.StandardCharsets;
6+
7+
import org.junit.jupiter.api.Test;
8+
9+
import tools.jackson.databind.ObjectMapper;
10+
import tools.jackson.databind.testutil.DatabindTestUtil;
11+
12+
import static org.junit.jupiter.api.Assertions.assertEquals;
13+
14+
// [databind#5372]: Property name mismatch problem,
15+
// caused by [core#1491]; verify that databind usage fixed as well
16+
public class PropertyMismatch5372Test extends DatabindTestUtil
17+
{
18+
static class TestObject5372 {
19+
private String aaaabbbbcccc;
20+
private String aaaabbbbcccc2;
21+
22+
public String getAaaabbbbcccc2() {
23+
return aaaabbbbcccc2;
24+
}
25+
26+
public void setAaaabbbbcccc2(String aaaabbbbcccc2) {
27+
this.aaaabbbbcccc2 = aaaabbbbcccc2;
28+
}
29+
30+
public String getAaaabbbbcccc() {
31+
return aaaabbbbcccc;
32+
}
33+
34+
public void setAaaabbbbcccc(String aaaabbbbcccc) {
35+
this.aaaabbbbcccc = aaaabbbbcccc;
36+
}
37+
}
38+
39+
private final String KEY_1 = "aaaabbbbcccc";
40+
private final String KEY_2 = "aaaabbbbcccc2";
41+
42+
private final String DOC_5372 = """
43+
{
44+
"%s": "v3",
45+
"%s": "v4"
46+
}
47+
""".formatted(KEY_1, KEY_2);
48+
49+
private final ObjectMapper MAPPER = newJsonMapper();
50+
51+
@Test
52+
void testIssue5372Bytes() throws Exception
53+
{
54+
final byte[] bytes = DOC_5372.getBytes(StandardCharsets.UTF_8);
55+
_assert5372(MAPPER.readValue(bytes, TestObject5372.class));
56+
_assert5372(MAPPER.readValue(new ByteArrayInputStream(bytes), TestObject5372.class));
57+
}
58+
59+
@Test
60+
void testIssue5372Chars() throws Exception
61+
{
62+
_assert5372(MAPPER.readValue(DOC_5372, TestObject5372.class));
63+
_assert5372(MAPPER.readValue(new StringReader(DOC_5372), TestObject5372.class));
64+
}
65+
66+
private void _assert5372(TestObject5372 result) {
67+
assertEquals("v3", result.getAaaabbbbcccc());
68+
assertEquals("v4", result.getAaaabbbbcccc2());
69+
}
70+
}

0 commit comments

Comments
 (0)