XStream
  1. XStream
  2. XSTR-298

Annotation @XStreamAlias is ignored for classes without any class level annotation

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.2
    • Component/s: None
    • Labels:
      None

      Description

      public static class House {
      @XStreamAlias("total-number-of-rooms")
      private int rooms;
      protected House(int rooms)

      { this.rooms = rooms; }

      public int getRooms()

      { return rooms; }

      }

      public void testAnnotationForFieldAliases()

      { Annotations.configureAliases(xstream, House.class); House house = new House(5); String expectedXml = "<com.thoughtworks.acceptance.annotations.AnnotationsTest-House>\n"+ " <total-number-of-rooms>5</total-number-of-rooms>\n" + "</com.thoughtworks.acceptance.annotations.AnnotationsTest-House>"; assertBothWays(house, expectedXml); }

        People

        • Assignee:
          Unassigned
          Reporter:
          Guilherme Silveira
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: