1 Reply Latest reply on Mar 6, 2008 6:14 PM by aloubyansky

    Duplicate attributes

      I just found an interesting case that we should probably validate and fail.

      public class BaseClass
      {
       @XmlAttribute(name="something");
       public void setSomething(String value) {}
      }
      
      public class MyClass extends BaseClass
      {
       @XmlAttribute(name="something")
       public void setSomethingElse(String value) {}
      }
      


      I gues which one gets used depends upon the order they appear
      in the properties retriefved from BeanInfo?
      But this should really be an error. You should have to do:

      public class MyClass extends BaseClass
      {
       @XmlTransient
       public void setSomething(String value) { super.setSomething(value); }
      
       @XmlAttribute(name="something")
       public void setSomethingElse(String value) {}
      }
      


      The same issue probably exists for properties on the same class
      and elements as well?