Hi Robert,
Am 11.03.13 12:27, schrieb Sandell, Robert:
> @Deprecated
> public static class DescriptorImpl extends SCMDescriptor<DarcsScm> {
> public Object readResolve() {
> return new DarcsScmDescriptor(whatEverOldDataYouHad);
> }
> }This will not work. XStream will spit out very large exception. Also the architecture of Jenkins imply to use Jenkins.XSTREAM2.addCompatibilityAlias(...); I found the probem why this does not work: hudson.model.Descriptor#load() loads hudson.XmlFile by hudson.model.Descriptor#getConfigFile() with the default constructor. Then XmlFile is instantiated with XmlFile#DEFAULT_XSTREAM which is inaccessable from outside. So it's not possible to add aliases. I've circumvented this with a workaround by implement the Descriptor#load() completely by my self in DarcsScmDescriptor and inject Jenkins#XSTREAM2 to the XmlFile object. Maybe a better solution is to make hudson.model.Descriptor#getConfigFile() overridable by descendants. My solution is viewable here: https://github.com/Weltraumschaf/darcs-plugin/commit/d3be75ec4777ad3aaaf83a4270a52360236c52c4 -Sven -- About: https://www.weltraumschaf.de/
smime.p7s
Description: S/MIME Kryptografische Unterschrift
