You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Roland Bergler (Jira)" <ji...@apache.org> on 2022/01/31 13:05:00 UTC

[jira] [Created] (OPENEJB-2153) CDI iterated instance.select broken

Roland Bergler created OPENEJB-2153:
---------------------------------------

             Summary: CDI iterated instance.select broken
                 Key: OPENEJB-2153
                 URL: https://issues.apache.org/jira/browse/OPENEJB-2153
             Project: OpenEJB
          Issue Type: Bug
          Components: tomee
         Environment: Linux, openjdk 11
            Reporter: Roland Bergler


within an openejb server (version 8.0.9) I have Managed Beans annotated with two qualifiers each. Examples from my test project:
{noformat}
@FoodQualifier(FoodType.FRUIT)
@TasteQualifier(TasteType.JUMMY)
public class Strawberry extends Food {
... {noformat}
I got an injected Instances object, on which I select instances in a two-step process:
{noformat}
@Inject @Any private Instance<Food> allTypesOfFood;
...
Instance<Food> vegetables = allTypesOfFood.select(new LiteralFoodType(FoodType.VEGETABLE)); Instance<Food> jummyVegetables = vegetables.select(new TasteQualifier.Literal(TasteType.JUMMY));
TasteQualifier.Literal(TasteType.JUMMY));
{noformat}
The second call to "select" seems to completely ignore the fact it is meant to be working on a restricted set, it yields all JUMMY foots, not just the vegetables.

Find code here: [https://github.com/montanero/openejb-bug] (just type mvn install)

 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)