Package hudson.util
Class HeapSpaceStringConverter
java.lang.Object
com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
hudson.util.HeapSpaceStringConverter
- All Implemented Interfaces:
com.thoughtworks.xstream.converters.ConverterMatcher,com.thoughtworks.xstream.converters.SingleValueConverter
public class HeapSpaceStringConverter
extends com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
Up to XStream 1.3 the default
StringConverter in XStream
used String.intern(), which stressed the
(rather limited) PermGen space with a large XML file.
Since XStream 1.3 it use a WeakHashMap cache to always use the same String instances, but
this has also major problems with a single long living XStream instance (as we have in Jenkins)
See XSTR-604.
Use this to avoid that (instead those strings will now be allocated to the heap space.)
- Author:
- Kohsuke Kawaguchi
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
toString
-
Constructor Details
-
HeapSpaceStringConverter
public HeapSpaceStringConverter()
-
-
Method Details
-
canConvert
- Specified by:
canConvertin interfacecom.thoughtworks.xstream.converters.ConverterMatcher- Specified by:
canConvertin classcom.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
-
fromString
- Specified by:
fromStringin interfacecom.thoughtworks.xstream.converters.SingleValueConverter- Specified by:
fromStringin classcom.thoughtworks.xstream.converters.basic.AbstractSingleValueConverter
-