You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Jean-Louis Monteiro (Jira)" <ji...@apache.org> on 2022/02/07 22:49:00 UTC

[jira] [Commented] (OPENEJB-2153) CDI iterated Instance#select broken

    [ https://issues.apache.org/jira/browse/OPENEJB-2153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17488474#comment-17488474 ] 

Jean-Louis Monteiro commented on OPENEJB-2153:
----------------------------------------------

It's been fixed in OpenWebBeans 2.0.26 which is under vote currently. We'll upgrade the dependency in TomEE as soon as it's available. And it should be available and fixed in TomEE in next release. Or you can manually do the upgrade in the tomee/lib directory meanwhile.

> 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
>            Priority: Major
>
> 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.YUMMY)
> public class Strawberry extends Food {
> ... {noformat}
> I got an injected Instance object, on which I want to select beans in a two-step process:
> {noformat}
> @Inject @Any private Instance<Food> allTypesOfFood;
> ...
> Instance<Food> vegetables = allTypesOfFood.select(new LiteralFoodType(FoodType.VEGETABLE));  
> Instance<Food> yummyVegetables = vegetables.select(new LiteralTasteType(TasteType.YUMMY));
>  {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 YUMMY 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)