Uploaded image for project: 'JBoss Marshalling'
  1. JBoss Marshalling
  2. JBMAR-78

Serial Marshaller should serialize the subject when serialize an instance of Externalizer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.2.0.CR4
    • None
    • Serial
    • None

      Currently the SerialMarshaller/UnMarshaller is not maintaining the correct class subject information for Externalizer instances. This should be serialized out along with the Externalizer instance.

      Current Issue:

      public final class ExternalizedObject implements Externalizable, Creator {

      ...

      /**

      {@inheritDoc}

      */
      public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException

      { externalizer = (Externalizer) in.readObject(); final Object o = externalizer.createExternal(getClass(), in, this); /* <--- This getClass doesn't work. This will always be ExternalizedObject and the subject should really be the object to create. The class should be written out and read in before the externalizer. */ externalizer.readExternal(o, in); obj = o; }

      ...

      }

              johnbailey_jira John Bailey (Inactive)
              johnbailey_jira John Bailey (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: