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

CDI iterated Instance#select broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.25
    • 2.0.26
    • Injection and Lookup
    • None
    • linux, openjdk 11

    Description

      I found the following bug within an openejb server (version 8.0.9), but can be reproduced with owb arquillian container, but not with weld.

      I have Managed Beans annotated with two qualifiers each (Examples from my test project, URL below):

      @FoodQualifier(FoodType.FRUIT)
      @TasteQualifier(TasteType.YUMMY)
      public class Strawberry extends Food {
      ... 

      I got an injected Instance object, on which I want to select beans in a two-step process:

      @Inject @Any private Instance<Food> allTypesOfFood;
      ...
      Instance<Food> vegetables = allTypesOfFood.select(new LiteralFoodType(FoodType.VEGETABLE));  
      Instance<Food> yummyVegetables = vegetables.select(new LiteralTasteType(TasteType.YUMMY));
       

      The second call to "select" seems to completely ignore the fact it is meant to be working on a restricted set, it yields all YUMMY foots, not just the vegetables.

      Find code here: https://github.com/montanero/openejb-bug, type

      mvn install -P owb

       

      Attachments

        Issue Links

          Activity

            People

              romain.manni-bucau Romain Manni-Bucau
              montaneroo Roland Bergler
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: