You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2017/08/29 08:29:00 UTC

[jira] [Resolved] (OWB-935) wrong result of javax.enterprise.inject.Instance in combination with alternatives

     [ https://issues.apache.org/jira/browse/OWB-935?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg resolved OWB-935.
-------------------------------
       Resolution: Not A Problem
    Fix Version/s:     (was: 1.7.5)

I read the section in 5.5.2 again, and OWB really behaves as the spec dictates: If there is a single Alternative in the List of resolved Beans, then ann non-alternatives get removed. 

That might look counter-intuitive for Instance<T>, but it is exactly as defined by the spec! 

> wrong result of javax.enterprise.inject.Instance in combination with alternatives
> ---------------------------------------------------------------------------------
>
>                 Key: OWB-935
>                 URL: https://issues.apache.org/jira/browse/OWB-935
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Injection and Lookup
>    Affects Versions: 1.2.2
>            Reporter: Gerhard Petracek
>            Assignee: Mark Struberg
>         Attachments: OWB-935.zip
>
>
> if the result of InjectionResolver#findByAlternatives is > 1 (for InstanceImpl#iterator) and there is one alternative-bean in the result, beans without alternative implementations aren't part of the result, because alternativeSet only contains alternative beans - see:
> {code}
>         if (containsAlternative)
>         {
>             return alternativeSet;
>         }
>         return enableSet;
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)