From 0ebfcc69527b1049d5680cec5cf8c05f8676de83 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Fri, 19 Jun 2009 13:57:03 +0000 Subject: [PATCH] SPR-5760 - XStreamMarshaller can not activate XStream automatic annotations detection feature git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@1405 50f2f4bb-b051-0410-bef5-90022cba6387 --- .../springframework/oxm/xstream/XStreamMarshaller.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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. */