Skip to content

Commit b9d5e42

Browse files
committed
Merge branch '2.17' into 2.18
2 parents 9ba9dfa + 7693244 commit b9d5e42

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test/java/com/fasterxml/jackson/failing/BigDecimalParsing4694Test.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,21 @@ public class BigDecimalParsing4694Test extends DatabindTestUtil
2020
}
2121
BIG_DEC_STR = sb.toString();
2222
}
23+
private final BigDecimal BIG_DEC = new BigDecimal(BIG_DEC_STR);
2324

2425
private final ObjectMapper MAPPER = newJsonMapper();
2526

2627
// [databind#4694]: decoded wrong by jackson-core/FDP for over 500 char numbers
2728
@Test
2829
public void bigDecimal4694FromString() throws Exception
2930
{
30-
assertEquals(new BigDecimal(BIG_DEC_STR),
31-
MAPPER.readValue(BIG_DEC_STR, BigDecimal.class));
31+
assertEquals(BIG_DEC, MAPPER.readValue(BIG_DEC_STR, BigDecimal.class));
3232
}
3333

3434
@Test
3535
public void bigDecimal4694FromBytes() throws Exception
3636
{
3737
byte[] b = utf8Bytes(BIG_DEC_STR);
38-
assertEquals(new BigDecimal(BIG_DEC_STR),
39-
MAPPER.readValue(b, 0, b.length, BigDecimal.class));
38+
assertEquals(BIG_DEC, MAPPER.readValue(b, 0, b.length, BigDecimal.class));
4039
}
4140
}

0 commit comments

Comments
 (0)