XStream
  1. XStream
  2. XSTR-279

Annotations are not inherited from parent classes

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      Sun 1.5.0_06 / Win XP

      Description

      When a parent class has annotations on it's fields and the child class is serialized, the fields inherited from the parents are not named correctly. This should be corrected by adding a @Inherited annotation to the @XStreamAlias annotation definition.

        Issue Links

          Activity

          Hide
          Mark Reynolds added a comment -

          The @Inherit annotation does not have any effect for field level annotations.

          I think the correct solution is to get inherited fields and their annotations when processing a class for it's annotations. Here is a patch which also includes a test case (this patch also includes my test case from XSTR-297).

          Show
          Mark Reynolds added a comment - The @Inherit annotation does not have any effect for field level annotations. I think the correct solution is to get inherited fields and their annotations when processing a class for it's annotations. Here is a patch which also includes a test case (this patch also includes my test case from XSTR-297 ).
          Hide
          Jörg Schaible added a comment -

          Annotations are now always inherited. You may give the head revision a try.

          Show
          Jörg Schaible added a comment - Annotations are now always inherited. You may give the head revision a try.
          Hide
          Jörg Schaible added a comment -

          Closing issues before next release.

          Show
          Jörg Schaible added a comment - Closing issues before next release.

            People

            • Assignee:
              Jörg Schaible
              Reporter:
              Philippe Lefebvre
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: