XStream
  1. XStream
  2. XSTR-92

No treatment of specialized serialization

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.0.1
    • Fix Version/s: 1.1
    • Component/s: Core
    • Labels:
      None

      Description

      Java classes may define a specialized serialization (see JavaDoc for
      Serializable) by defining two methods:

      private void writeObject(ObjectOutputStream out) throws IOException
      private void readObject(ObjectInputStream in) throws IOException

      XStream is not capable of handling these cases.

      A simple usecase:

      public class SpecialClass {
      protected transient String[] array = ...
      private void writeObject( ObjectOutputStream out )

      { // do something special with "array" here (i.e. encrpyt it) // and write to "out" }

      }

      XStream does not look at "array" because it's transient, but does also not treat writeObject(), so a serialized object of SpecialClass will be empty.

        People

        • Assignee:
          Unassigned
          Reporter:
          Andreas Rummler
        • Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: