diff --git a/org.springframework.oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java b/org.springframework.oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java index b3e4958a9e7..f431cc5c2e8 100644 --- a/org.springframework.oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java +++ b/org.springframework.oxm/src/main/java/org/springframework/oxm/xstream/XStreamMarshaller.java @@ -269,6 +269,16 @@ public class XStreamMarshaller extends AbstractMarshaller implements Initializin this.getXStream().processAnnotations(annotatedClasses); } + /** + * Set the auto-detection mode of XStream. + *
Note that auto-detection implies that the XStream is configured while it is processing the + * XML steams, and thus introduces a potential concurrency problem. + * @see XStream#autodetectAnnotations(boolean) + */ + public void setAutodetectAnnotations(boolean autodetectAnnotations) { + this.getXStream().autodetectAnnotations(autodetectAnnotations); + } + /** * Set the XStream hierarchical stream driver to be used with stream readers and writers. */