Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-739

BeanBuilder#readFromType should respect @Typed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.3
    • 1.1.0
    • Core
    • None

    Description

      BeanBuilder#readFromType currently includes all superclasses of a type in the set of bean types and it does not respect the @Typed annotation.

      This currently also causes a problem with PartialBeans which use @Typed.

      Example:

      public interface Rules {}
      
      public class BaseRules implements Rules {}
      
      @SomePartialBeanBinding
      @Typed(AdminRules.class)
      public abstract class AdminRules implements Rules {}
      
      public class Controller {
          @Inject private Rules rules;
      }
      

      This causes a deployment exception - ambiguous dependencies. The expected behaviour would be, that AdminRules is not resolvable as Rules.

      Attachments

        1. DELTASPIKE-739.diff
          2 kB
          Rafael Benevides
        2. ds-beanbuilder-typed-reproducer.zip
          7 kB
          Ron Smeral

        Activity

          People

            rafabene Rafael Benevides
            rsmeral Ron Smeral
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: