Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoyanchev committed Feb 4, 2014
1 parent d90a361 commit 1a8629d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ protected void writeToResult(T t, HttpHeaders headers, Result result) throws IOE
*/
protected XMLInputFactory createXmlInputFactory() {
XMLInputFactory inputFactory = XMLInputFactory.newInstance();
inputFactory.setProperty(XMLInputFactory.IS_REPLACING_ENTITY_REFERENCES, false);
inputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
return inputFactory;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public void readXmlTypeSet() throws Exception {

@Test
@SuppressWarnings("unchecked")
public void readXmlRootElementWithExternalEntity() throws Exception {
public void readXmlRootElementExternalEntityDisabled() throws Exception {

Resource external = new ClassPathResource("external.txt", getClass());
String content = "<!DOCTYPE root [" +
Expand All @@ -151,7 +151,6 @@ public void readXmlRootElementExternalEntityEnabled() throws Exception {
" <list><rootElement><type s=\"1\"/><external>&ext;</external></rootElement></list>";
MockHttpInputMessage inputMessage = new MockHttpInputMessage(content.getBytes("UTF-8"));

// Now read with
Jaxb2CollectionHttpMessageConverter<?> c = new Jaxb2CollectionHttpMessageConverter<Collection<Object>>() {
@Override
protected XMLInputFactory createXmlInputFactory() {
Expand Down

0 comments on commit 1a8629d

Please sign in to comment.