-
Feature Request
-
Resolution: Obsolete
-
Major
-
None
-
2.0.SP1
-
None
Currently, the specification states these limitations on what classes are beans. Namely it mentions that:
It has an appropriate constructor - either
* the class has a constructor with no parameters, or
* the class declares a constructor annotated @Inject.
This effectively means that a class which has single constructor that is parameterized and does not have @Inject annotation on it will not become a bean. In fact, it will blow the CDI up. Just like this class:
@Dependent public class Foo { // no @Inject annotation and no other constructor present public Foo(Bar bar) { } }
Could we loosen the limitation and in the above case automatically assume (effectively add) the @Inject annotation?