public class RobustCollectionConverter
extends com.thoughtworks.xstream.converters.collections.CollectionConverter
CollectionConverter
that ignores XStreamException
.
This allows Hudson to load XML files that contain non-existent classes (the expected scenario is that those classes belong to plugins that were unloaded.)
Constructor and Description |
---|
RobustCollectionConverter(com.thoughtworks.xstream.mapper.Mapper mapper,
com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider) |
RobustCollectionConverter(com.thoughtworks.xstream.XStream xs) |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Class type) |
protected void |
populateCollection(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
com.thoughtworks.xstream.converters.UnmarshallingContext context,
Collection collection) |
Object |
unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader,
com.thoughtworks.xstream.converters.UnmarshallingContext context) |
addCurrentElementToCollection, createCollection, marshal, populateCollection
public RobustCollectionConverter(com.thoughtworks.xstream.XStream xs)
public RobustCollectionConverter(com.thoughtworks.xstream.mapper.Mapper mapper, com.thoughtworks.xstream.converters.reflection.ReflectionProvider reflectionProvider)
public boolean canConvert(Class type)
canConvert
in interface com.thoughtworks.xstream.converters.ConverterMatcher
canConvert
in class com.thoughtworks.xstream.converters.collections.CollectionConverter
public Object unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context)
unmarshal
in interface com.thoughtworks.xstream.converters.Converter
unmarshal
in class com.thoughtworks.xstream.converters.collections.CollectionConverter
protected void populateCollection(com.thoughtworks.xstream.io.HierarchicalStreamReader reader, com.thoughtworks.xstream.converters.UnmarshallingContext context, Collection collection)
populateCollection
in class com.thoughtworks.xstream.converters.collections.CollectionConverter
Copyright © 2004–2019. All rights reserved.