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 2014/11/18 10:19:34 UTC
[jira] [Updated] (OWB-929) implicit filter in InstanceImpl#iterator
[ https://issues.apache.org/jira/browse/OWB-929?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Struberg updated OWB-929:
------------------------------
Fix Version/s: (was: 2.0.0)
1.5.0
> implicit filter in InstanceImpl#iterator
> ----------------------------------------
>
> Key: OWB-929
> URL: https://issues.apache.org/jira/browse/OWB-929
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Injection and Lookup
> Affects Versions: 1.1.8, 1.2.1
> Reporter: Gerhard Petracek
> Assignee: Gerhard Petracek
> Fix For: 1.1.9, 1.2.2, 1.5.0
>
> Attachments: OWB-929.patch
>
>
> if there are e.g. 3 managed-beans implementing the same interface (2 classes with custom qualifiers and 1 producer-method), a dyn. usage via javax.enterprise.inject.Instance#iterator (+ @Any) can result in 2 contextual-instances (instead of 3). it happens if the producer-method is used to select one of the other two beans and expose it with a different qualifier - e.g.:
> public class DefaultSelector {
> @Produces
> @Default
> @Dependent
> protected MyInterface selectDefault(
> @Qualifier1 MyInterface bean1,
> @Qualifier2 MyInterface bean2) {
> if (/*...*/) {
> return bean1;
> return bean2;
> }
> }
> reason:
> InstanceImpl#iterator is using a HashSet to collect the contextual-instances.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)