title: Why is java.util.RandomAccessSubList not serializable?
body: <p>Yesterday I had an odd exception that a class cannot be cast to itself - which took me several headbanging hours to solve.</p>
  
  <p>Long story short, the reason turned out to be that my EJB service returns a RandomAccessSubList for some cases, which (after checking the source out) I noticed was not Serializable.</p>
  
  <p>Of course I realize the guys who created this are probably much smarter than me but I couldn't help thinking that this is not a particularly good design decision.</p>
  
  <p>I understand that not all List implementations are Serializable, but why doesn't then the subList method take care of this by providing a SubList instance which implements Serializable for parents that also implement Serializable? It certainly does provide this for the RandomAccess interface.</p>
  
  <p>Or why not just mark the RandomAccessSubList as Serializable and let the original implementation (which RandomAccessSubList has a reference to) worry about the Serialization?</p>