Skip to content

Commit 5c38baa

Browse files
committed
fix a failing unit test
1 parent f6a2636 commit 5c38baa

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/test/java/tools/jackson/dataformat/xml/deser/NumberDeserWithXMLTest.java

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

33
import java.math.BigDecimal;
44

5-
import com.fasterxml.jackson.annotation.JsonProperty;
6-
import com.fasterxml.jackson.annotation.JsonRootName;
7-
import com.fasterxml.jackson.annotation.JsonSubTypes;
8-
import com.fasterxml.jackson.annotation.JsonTypeInfo;
9-
import com.fasterxml.jackson.annotation.JsonUnwrapped;
5+
import com.fasterxml.jackson.annotation.*;
106

117
import tools.jackson.core.StreamReadConstraints;
12-
import tools.jackson.databind.DatabindException;
8+
import tools.jackson.core.exc.StreamConstraintsException;
139
import tools.jackson.databind.ObjectMapper;
1410
import tools.jackson.dataformat.xml.XmlFactory;
1511
import tools.jackson.dataformat.xml.XmlMapper;
@@ -135,9 +131,9 @@ public void testVeryBigDecimalUnwrapped() throws Exception
135131
try {
136132
MAPPER.readValue(DOC, NestedBigDecimalHolder2784.class);
137133
fail("expected DatabindException");
138-
} catch (DatabindException jme) {
139-
assertTrue("unexpected exception message: " + jme.getMessage(),
140-
jme.getMessage().startsWith("Number value length (1200) exceeds the maximum allowed"));
134+
} catch (StreamConstraintsException e) {
135+
assertTrue("unexpected exception message: " + e.getMessage(),
136+
e.getMessage().startsWith("Number value length (1200) exceeds the maximum allowed"));
141137
}
142138
}
143139

0 commit comments

Comments
 (0)