-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
None
-
-
-
With the following classes on the classpath:
DeactivatableTest.java
@Inject
private MyBean myBean;
MyBean.java
@Exclude public class MyBean {}
ExcludeExtensionDeactivator.java
public class ExcludeExtensionDeactivator implements ClassDeactivator { public Boolean isActivated(Class<? extends Deactivatable> targetClass { if (ExcludeExtension.class.equals(targetClass)) { return false; } return null; } }
..the injection point in DeactivatableTest is marked with a warning:
No bean is eligible for injection to the injection point [JSR-299 §5.2.1]
..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.