title: XStream - use previous serialized object after adding a function to the interface?
body: <p>I use XStream to serialize an object "A" implementing an interface : </p>
  
  <pre><code>interface MyInterface { 
         String functionA();
  }
  
  MyInterface a = new MyInterface() {...}
  </code></pre>
  
  <p>Now the interface changed , and I added another function: </p>
  
  <pre><code>interface MyInterface {
         String functionA();
         String functionB();
  }
  </code></pre>
  
  <p>Trying to deserialize it now fails (with the listed exception), because the interface changed - But can I make it work somehow? </p>
  
  <p>This is the exception:</p>
  
  <pre><code>com.thoughtworks.xstream.mapper.CannotResolveClassException: com.cf.TestSaveSerialization$1 : com.cf.TestSaveSerialization$1
      at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:68)
      at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:38)
      at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:71)
  </code></pre>
  
  <p>I've looked at the <a href="http://xstream.codehaus.org/faq.html#Serialization_newer_class_versions" rel="nofollow">XStream FAQ</a> , but there's nothing about changing functions. Any idea?</p>