Skip to content

Commit 0d394a0

Browse files
committed
Fix test check
1 parent d996a09 commit 0d394a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spring-web/src/test/java/org/springframework/http/converter/xml/Jaxb2RootElementHttpMessageConverterTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public void testXmlBomb() throws Exception {
153153
"<rootElement><external>&lol9;</external></rootElement>";
154154
MockHttpInputMessage inputMessage = new MockHttpInputMessage(content.getBytes("UTF-8"));
155155
this.thrown.expect(HttpMessageNotReadableException.class);
156-
this.thrown.expectMessage("DOCTYPE is disallowed");
156+
this.thrown.expectMessage("DOCTYPE");
157157
this.converter.read(RootElement.class, inputMessage);
158158
}
159159

spring-web/src/test/java/org/springframework/http/converter/xml/SourceHttpMessageConverterTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public void readDomSourceWithXmlBomb() throws Exception {
130130
MockHttpInputMessage inputMessage = new MockHttpInputMessage(content.getBytes("UTF-8"));
131131

132132
this.thrown.expect(HttpMessageNotReadableException.class);
133-
this.thrown.expectMessage("DOCTYPE is disallowed");
133+
this.thrown.expectMessage("DOCTYPE");
134134

135135
this.converter.read(DOMSource.class, inputMessage);
136136
}
@@ -187,7 +187,7 @@ public void readSAXSourceWithXmlBomb() throws Exception {
187187
SAXSource result = (SAXSource) this.converter.read(SAXSource.class, inputMessage);
188188

189189
this.thrown.expect(SAXException.class);
190-
this.thrown.expectMessage("DOCTYPE is disallowed");
190+
this.thrown.expectMessage("DOCTYPE");
191191

192192
InputSource inputSource = result.getInputSource();
193193
XMLReader reader = result.getXMLReader();

0 commit comments

Comments
 (0)