Title: Message Title
| |
|
|
|
|
When starting container with the below classes (trying to inject implementation of GenericFoo (FooImpl) to field foo in Bar) DeploymentException exception is thrown. {code:java} interface GenericFoo<T extends Comparable<T>> { T someMethod(); }
class FooImpl<T extends Comparable<T>> implements GenericFoo<T> { @Override public T someMethod() { return null; } }
class Bar { @Inject private GenericFoo<Long> foo; }
{code}
CDI Spec 5.2.4. states that a parameterized bean type is considered assignable to a parameterized required type if they have identical raw type and for each parameter: +the required type parameter is an actual type, the bean type parameter is a type variable and the actual type is assignable to the upper bound, if any, of the type variable.+
From my understanding, the injection should work.
Stacktrace:
{code:java} at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:378) at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:290) at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:143) at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:164) at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:526) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:64) at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:62) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62) at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55) at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) at java.util.concurrent.FutureTask.run(FutureTask.java) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) {code}
|
|
|
|
| |
|
|
_______________________________________________
weld-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/weld-issues