title: Java - New Object definition reading old objects
body: <p>Not sure if the title is appropriate, but here is my question</p>
  
  <p>I wrote a class, for example,</p>
  
  <p><strong>version 1</strong></p>
  
  <pre><code>class SomeClass
  {
      public method1()
      {
          ...
          ...
      }
  
      public method2()
      {
          ...
          ...
      }
  }
  </code></pre>
  
  <p>The objects of SomeClass are pushed to a message queue by different modules say</p>
  
  <pre><code>module1
  module2
  module3
  </code></pre>
  
  <p>which then is being processed <code>module4</code> </p>
  
  <p>Now, <code>module3</code> requires some additional functionality method3() so I added additional functionality to SomeClass</p>
  
  <p><strong>version 2</strong></p>
  
  <pre><code>class SomeClass
  {
      public method1()
      {
          ...
          ...
      }
  
      public method2()
      {
          ...
          ...
      }
  
      public method3()
      {
          ...
          ...
      }
  }
  </code></pre>
  
  <p>and updated <code>module3</code> and <code>module 4</code> with this new class, however module1 and module2 are not</p>
  
  <p><code>module3</code> will post objects of <code>SomeClass</code> (version 2) to the message queue, however <code>module1</code> and <code>module2</code> still post objects of <code>SomeClass</code> (version 1)</p>
  
  <p>Will there be any problems for <code>module 4</code> that has version 2 definition to read the objects of version 1 definition?</p>