Dependency Injection: Diagnostic for dependency class with no @Inject
and no-arg constructor
#191
Labels
diagnostic
Diagnostic item
project-info-needed
Cannot be implemented until there is logic to get more information from the Java project
Which Java classes are managed beans?
Injection using the bean constructor
Diagnostics
@Inject
field/method/constructor@Inject
annotating, deliver two different diagnostics@Inject
(implemented in [diagnostic] Declaring Managed Bean #108, however it is delivering an error rather than a warning.)Note: The diagnostic should be a WARNING if there are alternative managed beans, else it should be an ERROR.
Quick Fix
@Inject
for the existing constructor that takes in parameters (implemented in [diagnostic] Declaring Managed Bean #108, however it does not check if the parameters are injection points as per the specifications, which depend son WebServlet annotation type check is unsound #159)Example
The following is a faulty code snippet example:
Note: The existing constructor cannot be annotated with
@Inject
because the parameters must be injectable as well according to the specRelated to #153
The text was updated successfully, but these errors were encountered: