|
[
Permalink
| « Hide
]
mindless added a comment - 27/Feb/10 03:57 PM
Let's just say that tracing this was not very fun The change to override that method was made in cs3313 in May 2007. I would expect some people still have XML files from that time, but I don't know exactly what this was supposed to fix. There were no tests created at the time of the change. Ok, so that mapper was added in r3313, shortly after switch from XStream 1.1.3 to 1.2.1. Not sure when XmlFriendlyReplacer came into play, but prior to Hudson 1.106 perhaps the "-" and "_DOLLAR_" encoding were used.. I'll try it out. Yes, Hudson 1.105 writes just "-" for inner classes instead of "_-". Coincidentally, I'm working on a management screen related to updating old deprecated data in xml files (branches/old-data-monitor in svn).. this issue may fit into this work. Here's what I'm thinking: 1. remove useXStream11XmlFriendlyMapper() in XStream2 2. add code in RobustReflectionConverter to catch unknown-field errors and give it another try with the "-" mapping.. if this makes it work, report this file to the OldDataMonitor so that manage screen can help in re-saving this file in the new format. That sounds right. I don't think the old format can be confused with a member name since "-" is not allowed as a Java identifier in the case that the tag is being interpreted under the new scheme. The _DOLLAR_ stuff seems even less likely to cause a problem. I guess you could have a problem if a non-Java JVM language had a field in an object that had "-" as part of the name and that got serialized as part of a Hudson object, but that seems way far-fetched. Code changed in hudson |
||||||||||||||||||||||||||||||||||||||||