-
Sub-task
-
Resolution: Done
-
Major
-
None
-
Documentation (Ref Guide, User Guide, etc.)
-
Not Required
This quick fix should offer next:
1. Delete @Disposes/@Observes annotation
2. Delete @Produces annotation
Test case:
EXECUTE: Create CDI project
EXECUTE: Create TestBean class
package org.test; import javax.enterprise.event.Observes; import javax.enterprise.inject.Produces; public class TestBean { @Produces public String produceString(@Observes String aa){ return "test"; } }
ASSERT: @Produces and @Observes annotations should be marked by problem markers
EXECUTE: Point mouse to @Produces or @Observes annotation
ASSERT: Text hover with quick fixes appears
EXECUTE: Create TestBean2 class
package org.test; import javax.enterprise.inject.Disposes; import javax.enterprise.inject.Produces; public class TestBean2 { @Produces public String produceString(@Disposes String aaa){ return "test"; } }
ASSERT: @Produces and @Disposes annotations should be marked by problem markers
EXECUTE: Point mouse to @Produces or @Disposes annotation
ASSERT: Text hover with quick fixes appears