Affects Version/s: 1.4.4
Fix Version/s: 1.4.5
One of the design patterns employed in Jenkins is to provide multiple implmenetations that implement the same contract so that common cases run faster. Think of EnumSet in JDK.
To facilitate this kind of situation, it is desirable for those implmentation-only subtypes (JumboEnumSet vs RegularEnumSet) not to leak into the persisted form.
I added XStreamSerializeAs to achieve this. You put this on the likes of EnumSet, and all subtypes get persisted as EnumSet combined with suitable Converter that instantiates the right subtype, this works well.
Did you ever had a look at XStream.aliasType()? It seems that this functionality already covers this patch except that it is not (yet) declarable with an annotation.
I think you are right. If AnnotationMapper can talk to ClassAliasingMapper it seems possible to leverage that.
Implemented with annotation XStreamAliasType (reflecting the call of XStream.aliasType()).