-
Sub-task
-
Resolution: Done
-
Major
-
None
-
Documentation (Ref Guide, User Guide, etc.)
-
Not Required
This quick fix should offer to Delete @Observes annotation
Test case:
EXECUTE: Create CDI project
EXECUTE: Create ObserverInDecorator class
package org.test; import javax.decorator.Decorator; import javax.decorator.Delegate; import javax.enterprise.event.Observes; import javax.inject.Inject; @Decorator public class ObserverInDecorator { @Inject @Delegate @AAnnotation String str; public void method(@Observes String param){ } }
ASSERT: @Observes annotation should be marked by problem marker
EXECUTE: Point mouse to @Observes annotation
ASSERT: Text hover with quick fixe appears
EXECUTE: Create ObserverInInterceptor class
package org.test; import javax.enterprise.event.Observes; import javax.interceptor.Interceptor; @Interceptor @FooBinding public class ObserverInInterceptor { public void method(@Observes String param){ } }
ASSERT: @Observes annotation should be marked by problem marker
EXECUTE: Point mouse to @Observes annotation
ASSERT: Text hover with quick fixe appears