-
Sub-task
-
Resolution: Done
-
Major
-
None
-
Documentation (Ref Guide, User Guide, etc.)
This quick fix should offer to add generated name as value member to @Named annotation
Test case:
EXECUTE:
1. Create CDI Project
2. Create java classes:
import javax.inject.Named; @Named("order") public class Order { }
import javax.inject.Named; @Named("order2") public class Order2 extends Order { }
import javax.inject.Inject; import javax.inject.Named; public class TestBean { @Inject public void init(@Named Order order) { // DO nothing } }
3. Build project
4. Open TestBean class in Java Editor
ASSERT: annotation @Named should be marked with problem "Injection point other than injected field must not declare a @Named annotation that does not specify the value member [JSR-299 §3.11]"
EXECUTE: Point mouse to annotation @Named and press Ctrl
ASSERT: Quick fixes should be shown in Pop Up menu:
EXECUTE: select one of quick fixes
ASSERT: annotation @Named should be changed to @Named("oreder") or @Named("order2") accordingly