In my experience Stephen is correct. It's the approach I mostly use [1] and
I have tests that verifies it [2].

[1]
https://github.com/jenkinsci/build-failure-analyzer-plugin/blob/master/src/main/java/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseBuildAction.java
[2]
https://github.com/jenkinsci/build-failure-analyzer-plugin/blob/master/src/test/java/com/sonyericsson/jenkins/plugins/bfa/BackwardsCompatibilityTest.java

/B



2014-08-07 22:29 GMT+02:00 Stephen Connolly <[email protected]
>:

>
>
> On Thursday, 7 August 2014, Jesse Glick <[email protected]> wrote:
>
>> On Thu, Aug 7, 2014 at 10:35 AM, Stephen Connolly
>> <[email protected]> wrote:
>> > Sounds like a regression then
>>
>> I think not:
>>
>> http://xstream.codehaus.org/faq.html#Serialization_newer_class_versions
>>
>> > If a field is removed from the class, deserializing an old version that
>> contains the field will cause an exception.
>>
>> (Jenkins just marks this “old data”.)
>>
>> > Leaving the field in place but declaring it as transient will avoid the
>> exception, but XStream will not try to deserialize it.
>>
>> Which answers this question.
>
>
> Well last time I did a migration in the cloudbees-deployer-plugin and
> other plugins too the transient fields were deserialised and non-null
> allowing me to migrate the values in the readResolve method...
>
>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Developers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> Sent from my phone
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to