Skip to content

Commit c577dc0

Browse files
committed
Minor test fix
1 parent 8ee537b commit c577dc0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/test/java/com/fasterxml/jackson/dataformat/xml/failing/Fuzz465_32906_CDataReadTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.fasterxml.jackson.dataformat.xml.failing;
22

3+
import com.fasterxml.jackson.core.exc.StreamReadException;
34
import com.fasterxml.jackson.databind.JsonNode;
45
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
56
import com.fasterxml.jackson.dataformat.xml.XmlTestBase;
@@ -11,7 +12,11 @@ public class Fuzz465_32906_CDataReadTest extends XmlTestBase
1112
public void testIssue465() throws Exception
1213
{
1314
byte[] doc = readResource("/data/fuzz-32906.xml");
14-
JsonNode root = MAPPER.readTree(doc);
15-
assertNotNull(root);
15+
try {
16+
JsonNode root = MAPPER.readTree(doc);
17+
fail("Should not pass, got: "+root);
18+
} catch (StreamReadException e) {
19+
verifyException(e, "Unexpected EOF in CDATA");
20+
}
1621
}
1722
}

0 commit comments

Comments
 (0)