XStream
  1. XStream
  2. XSTR-275

There is no way to enforce checking on "Serializable" interface for objects being serialized by XStream

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I didn't find a way to enforce the check that object sent to XStream implements Serializable interface.

      I know that sometimes its usefull to serialize non-serializable objects but in most situations, it's a programming mistake. Because I may send objects that by nature are not Serializable and the designer of the class intended to make them not serializable so, he/she didn't take care of what fields are transient or put a custom Serialization code.

      For example, your library premits serializing objects of class java.io.FileDescriptor. Try to do that and see the results of serialization then you will know that enforcing the check that Any object is serializable is important at some cases.

      I recommend you to have a flag passed in the constructor of XStream that when set, enforces any object to be serialized to implement java.io.Serializable interface.

      Thanks for this nice library,

        People

        • Assignee:
          Unassigned
          Reporter:
          Ali Ahmed Saad El Gamal
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: