title: What are the pros and cons of using serialVersionUID and @SuppressWarnings("serial") on classes implementing Serializable?
body: <p>This question has been the subject of some lively discussions in my team. My personal choice is to use </p>
  
  <pre><code>@SuppressWarnings("serial")
  </code></pre>
  
  <p>My thoughts are that it means there is one less thing to maintain compared to using </p>
  
  <pre><code>serialVersionUID
  </code></pre>
  
  <p>Am I correct in thinking that using this allows the compiler to generate the UID and is therefore more likely to pick up changes to the class? </p>
  
  <p>My biggest fear is that relying on a developer to change the UID when they change the class is more likely to lead to unforeseen errors. </p>
  
  <p>Are there any pitfalls to my approach? Has anyone else had good or bad experiences using either of these approaches? </p>