Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35618

RobustReflectionConverter makes incorrect class evolution assumption

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • None

      See the code here

      The issue here is that if you have an xml file with

      <someclass>
       <fieldName class="some.package.otherclass">
         ...
      </fieldName>
      </someclass>
      

      and someclass has evolved such that fieldName has migrated from one object type to another it will fail to deserialize.

      However - the implementations of the sub-types of the old fieldName type may well implement readResolve which can return an Object of any type - and in the case of data migration would be the new type.
      However this is not called and then Jenkins attempts to deserialize the XML with the new type which is pretty much doomed to fail or give corruption.

            issacnitin Nitin Joy
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: