[
https://issues.apache.org/jira/browse/OWB-935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14645953#comment-14645953
]
Gerhard Petracek edited comment on OWB-935 at 7/29/15 12:57 PM:
----------------------------------------------------------------
see the 3 tests - two of them fail
(all 3 should result in the same count, however, only the constellation without
activated default-beans result in the correct count. furthermore the amount of
enabled alternatives impact the result - see the all- vs. mixed-package...)
the issue is that qualifiers are ignored in #findByAlternatives *once* @Any is
used.
=> if you have at least one active alternative (e.g. for qualifier Q1), that
alternative impacts the rest of the result (-> also beans with a different
qualifier - in the test e.g. Q2).
was (Author: gpetracek):
see the 3 tests - two of them fail
(all 3 should result in the same count, however, only the constellation without
activated default-beans result in the correct count. furthermore the amount of
enabled alternatives impact the result - see the all- vs. mixed-package...)
the issue is that qualifiers are ignored in #findByAlternatives *once* @Any is
used.
-> if you have at least one active alternative (e.g. for qualifier Q1), that
alternative impacts the rest of the result (-> also beans with a different
qualifier - in the test e.g. Q2).
> 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.3.4#6332)