XStream
  1. XStream
  2. XSTR-183

Child elements of root element do not respond to: call to XStream.alias(...);

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.1
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      Sun JDK 1.5 for Windows

      Description

      First off this is a really cool API. Keep up the great work guys!

      The bug that I've encountered is when you have the following structure:

      public class Foo {

      public Fum fum;

      public Foo()

      { fum = new Fum(); }

      }
      // and:
      public class Fum {

      public String s;

      public Fum()

      { s = "test"; }

      }

      When I do the following:
      Foo f = new Foo();
      XStream xstream = new XStream();
      xstream.alias("Foo", Foo.class); // <- this one is honored
      xstream.alias("Fum", Fum.class); // <- this one is not honored

      The following document is created:
      <Foo>
      <fum>
      <string>test</string>
      </fum>
      </Foo>

      Fum should be uppercase but is left as lower case. I attempted to find where this change is made in code but I don't know the source code very well so I wasn't exactly sure where to look for that.

      I'm using the latest but I also tried with 1.1. They are all in the same package (not the default anonymous package) if that helps.

      Thanks,

      Arron

        People

        • Assignee:
          Unassigned
          Reporter:
          Arron Ferguson
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: