Uploaded image for project: 'OpenWebBeans'
  1. OpenWebBeans
  2. OWB-861

Decorator building fails when decorator has inheritance

    XMLWordPrintableJSON

    Details

      Description

      When there is a decorator which inherits from a base implementation.

      BaseDecorator - BaseModuleDecorator - ServiceDecorator(abstract) where the ServiceDecorator injects the delegate.
      It does not matter if the BaseDecorator or BaseModuleDecorator are abstract or not.
      The base decorators hold common resources for the concrete decorator implementation.

      The BaseDecorator is not removed from the 'decoratedTypes - set' but the BaseModuleDecorator is.

      This happens in org.apache.webbeans.component.creation.DecoratorBeanBuilder#defineDecoratedTypes(line: 189 - 196)

      ""
      ..
              Type superClass = beanClass.getGenericSuperclass();
              while (superClass != Object.class)
              {
                  decoratedTypes.remove(superClass);
                  superClass = superClass.getClass().getGenericSuperclass();
              }
              decoratedTypes.remove(Object.class);
              decoratedTypes.remove(java.io.Serializable.class); /* 8.1 */
      ..
      

      Is a decorator not supposed to inherit from another class ?

        Attachments

          Activity

            People

            • Assignee:
              romain.manni-bucau Romain Manni-Bucau
              Reporter:
              cchet Thomas Herzog
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: