7 Replies Latest reply on Oct 20, 2010 12:26 PM by Erik-Berndt Scheper

    Working on HHH-4646 and HHH-5177

    Hernán Chanfreau Master



      Here are HHH-4646 and HHH-5177.


      I've been looking at these issues and I realized that the main  problem is the way we are reading the audited properties. In  AuditedPropertiesReader class we have:


      private void addPropertiesFromClass(XClass clazz)  {
          XClass superclazz = clazz.getSuperclass();

          if (!clazz.isInterface() && !"java.lang.Object".equals(superclazz.getName())) {



          addFromProperties(clazz.getDeclaredProperties("field"), "field", fieldAccessedPersistentProperties);
          addFromProperties(clazz.getDeclaredProperties("property"), "property", propertyAccessedPersistentProperties);



      The actual algorithm process recursively superclasses. The concrete class is the last one processed.

      I think we could fix this issue if we check concrete class  first and we process superclasses only if the concrete class has audited  properties (or is audited at class level).
      Do you see any problem with these changes?

      I've already developed a patch and I've run some tests (including both attached tests on 4646 and 5177).

      After completing test cases I'll propose the patch if you agree.


      Regars. Hernán