Merge pull request #11349 from kwoyke/JAVA-7578

JAVA-7578: Fix xstream tests
This commit is contained in:
kwoyke 2021-10-18 14:36:11 +02:00 committed by GitHub
commit f5c27da41c
1 changed files with 10 additions and 2 deletions

View File

@ -15,10 +15,18 @@ public class SimpleXstreamInitializer {
}
public XStream getXstreamJettisonMappedInstance() {
return new XStream(new JettisonMappedXmlDriver());
XStream xstream = new XStream(new JettisonMappedXmlDriver());
xstream.allowTypesByWildcard(new String[]{
"com.baeldung.**"
});
return xstream;
}
public XStream getXstreamJsonHierarchicalInstance() {
return new XStream(new JsonHierarchicalStreamDriver());
XStream xstream = new XStream(new JsonHierarchicalStreamDriver());
xstream.allowTypesByWildcard(new String[]{
"com.baeldung.**"
});
return xstream;
}
}