XStream
  1. XStream
  2. XSTR-682

@XStreamAlias annotation seems to be broken

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 1.4.2
    • Fix Version/s: 1.4.2
    • Component/s: Annotations
    • Labels:
      None
    • JDK version and platform:
      Sun 1.6.0_27 for Mac O/S 10 & Windows

      Description

      Annotating a class with @XStreamAlias("event") fails to map to the class when mapping from XML to POJO.

      So for a class:

      @XStreamAlias("event")
      public final class AuditEventURL
      ...

      executing:

      xstream.fromXML(xml);

      results in <ws.cogito.auditing.model.AuditEventURL> rather than <event>.

      The work around is to configure xstream engine with an alias:

      xstream.alias("event", AuditEventURL.class);

      results in <event>

      But I would think this is redundant given the annotation.

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          Jeremy Deane
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: