XStream
  1. XStream
  2. XSTR-262

XML from javac/jikes inner classes are incompatible

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      Sun 1.4.2_05 for linux, jikes 1.22

      Description

      When streaming an inner class, the XML is different depending on whether the bytecode was generated with javac or jikes.
      XML written by one cannot be read by the other, it fails with a ConversionException caused by a CannotResolveClassException.

      For this code, the following XML is generated:

      import com.thoughtworks.xstream.XStream;

      public class XStreamTest
      {
      private class Inner {}

      private Inner inner = new Inner();

      public static void main(String[] args)

      { XStream xstream = new XStream(); XStreamTest test = new XStreamTest(); String xml = xstream.toXML( test ); System.out.println( xml ); }

      }

      —
      javac:

      <XStreamTest>
      <inner>
      <outer-class reference="../.."/>
      </inner>
      </XStreamTest>

      —
      jikes:

      <XStreamTest>
      <inner>
      <this reference="../.."/>
      </inner>
      </XStreamTest>

        People

        • Assignee:
          Unassigned
          Reporter:
          Seth Taplin
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: