Skip to content

Commit a1ec178

Browse files
committed
Merge branch '2.17' into 2.18
2 parents 436a069 + bf909b0 commit a1ec178

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

release-notes/VERSION-2.x

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ Project: jackson-databind
5555
#4575: StdDelegatingSerializer does not consider a Converter that may
5656
return null for a non-null input
5757
(reported, fix contributed by Peter L)
58+
#4577: Cannot deserialize value of type `java.math.BigDecimal` from
59+
String "3." (not a valid representation)
60+
(reported by @dmelisso)
5861
5962
2.17.1 (04-May-2024)
6063

src/test/java/com/fasterxml/jackson/databind/deser/jdk/BigNumbersDeserTest.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,23 @@ public void testBigIntegerUnlimited() throws Exception
106106
@Test
107107
public void testNumberStartingWithDot() throws Exception {
108108
_testNumberWith(".555555555555555555555555555555");
109-
}
110-
111-
// [databind#4435]
112-
@Test
113-
public void testNumberStartingWithMinusDot() throws Exception {
114109
_testNumberWith("-.555555555555555555555555555555");
110+
_testNumberWith("+.555555555555555555555555555555");
115111
}
116112

117-
// [databind#4435]
113+
// [databind#4577]
118114
@Test
119-
public void testNumberStartingWithPlusDot() throws Exception {
120-
_testNumberWith("+.555555555555555555555555555555");
115+
public void testNumberEndingWithDot() throws Exception {
116+
_testNumberWith("55.");
117+
_testNumberWith("-55.");
118+
_testNumberWith("+55.");
121119
}
122-
120+
123121
private void _testNumberWith(String num) throws Exception
124122
{
123+
BigDecimal exp = new BigDecimal(num);
125124
BigDecimalWrapper w = MAPPER.readValue("{\"number\":\"" + num + "\"}", BigDecimalWrapper.class);
126-
assertEquals(new BigDecimal(num), w.number);
125+
assertEquals(exp, w.number);
127126
}
128127

129128
private String generateJson(final String fieldName) {

0 commit comments

Comments
 (0)