diff --git a/core/pom.xml b/core/pom.xml
index 154b352b28bca379f17edd447e44318103b3b59f..40f07ba461f2447acf4fa8d17b928e97679ed72a 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -451,7 +451,7 @@ THE SOFTWARE.
org.jvnet.hudson
xstream
- 1.3.1-hudson-7
+ 1.3.1-hudson-8
jfree
diff --git a/core/src/main/java/hudson/util/XStream2.java b/core/src/main/java/hudson/util/XStream2.java
index 92bda5f8e94a715e20c98b735ec76a72879113cf..e0b743faa83b404e132897e888618d47cc0ba3f7 100644
--- a/core/src/main/java/hudson/util/XStream2.java
+++ b/core/src/main/java/hudson/util/XStream2.java
@@ -25,6 +25,7 @@ package hudson.util;
import com.google.common.collect.ImmutableMap;
import com.thoughtworks.xstream.XStream;
+import com.thoughtworks.xstream.mapper.AnnotationMapper;
import com.thoughtworks.xstream.mapper.Mapper;
import com.thoughtworks.xstream.mapper.MapperWrapper;
import com.thoughtworks.xstream.converters.Converter;
@@ -109,7 +110,7 @@ public class XStream2 extends XStream {
@Override
protected MapperWrapper wrapMapper(MapperWrapper next) {
- return new CompatibilityMapper(new MapperWrapper(next) {
+ Mapper m = new CompatibilityMapper(new MapperWrapper(next) {
@Override
public String serializedClass(Class type) {
if (ImmutableMap.class.isAssignableFrom(type))
@@ -118,6 +119,9 @@ public class XStream2 extends XStream {
return super.serializedClass(type);
}
});
+ AnnotationMapper a = new AnnotationMapper(m, getConverterRegistry(), getClassLoader(), getReflectionProvider(), getJvm());
+ a.autodetectAnnotations(true);
+ return a;
}
/**