[jbosstools-issues] [JBoss JIRA] (JBIDE-17811) Incorrect bean injection eligibility assumption for beans excluded using DeltaSpike @Exclude
Alexey Kazakov (JIRA)
issues at jboss.org
Mon Jul 14 14:28:29 EDT 2014
[ https://issues.jboss.org/browse/JBIDE-17811?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Kazakov updated JBIDE-17811:
-----------------------------------
Fix Version/s: LATER
(was: 4.2.0.CR1)
> Incorrect bean injection eligibility assumption for beans excluded using DeltaSpike @Exclude
> --------------------------------------------------------------------------------------------
>
> Key: JBIDE-17811
> URL: https://issues.jboss.org/browse/JBIDE-17811
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: cdi-extensions
> Environment: JBDS 8.0.0.Beta2d
> Reporter: Ron Šmeral
> Assignee: Viacheslav Kabanovich
> Fix For: LATER
>
>
> With the following classes on the classpath:
> {code:java|title=DeactivatableTest.java}
> @Inject
> private MyBean myBean;
> {code}
> {code:java|title=MyBean.java}
> @Exclude
> public class MyBean {}
> {code}
> {code:java|title=ExcludeExtensionDeactivator.java}
> public class ExcludeExtensionDeactivator implements ClassDeactivator {
> public Boolean isActivated(Class<? extends Deactivatable> targetClass {
> if (ExcludeExtension.class.equals(targetClass)) {
> return false;
> }
> return null;
> }
> }
> {code}
> ..the injection point in DeactivatableTest is marked with a warning:
> {noformat}
> No bean is eligible for injection to the injection point [JSR-299 §5.2.1] {noformat}
> ..which is incorrect. MyBean *is* eligible despite being annotated @Exclude, since ExcludeExtension is deactivated using the core DeltaSpike mechanism of deactivation (ClassDeactivator).
> There does not seem to be a (simple) solution to this other than executing the code in all available ClassDeactivators.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
More information about the jbosstools-issues
mailing list