[
https://issues.jboss.org/browse/JBIDE-9418?page=com.atlassian.jira.plugin...
]
Daniel Azarov updated JBIDE-9418:
---------------------------------
Description:
Test case:
EXECUTE: Create CDI project
EXECUTE: Create ObserverInDecorator class
{code}
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){
}
}
{code}
ASSERT: @Observes annotation should be marked by problem marker
EXECUTE: Point mouse to @Observes annotation
FAIL: Message is "Interceptor cannot have a method with a parameter annotated
@Observes"
EXECUTE: Create ObserverInInterceptor class
{code}
package org.test;
import javax.enterprise.event.Observes;
import javax.interceptor.Interceptor;
@Interceptor
@FooBinding
public class ObserverInInterceptor {
public void method(@Observes String param){
}
}
{code}
ASSERT: @Observes annotation should be marked by problem marker
EXECUTE: Point mouse to @Observes annotation
FAIL: Message is "Decorator cannot have a method with a parameter annotated
@Observes"
In case of "Interceptor/Decorator cannot have a method with a
parameter annotated @Observes [JSR-299 §10.4.2]" CDICoreValidator mixes up messages
for Interceptor and for Decorator
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBIDE-9418
URL:
https://issues.jboss.org/browse/JBIDE-9418
Project: Tools (JBoss Tools)
Issue Type: Bug
Components: cdi
Affects Versions: 3.3.0.M2
Reporter: Daniel Azarov
Assignee: Daniel Azarov
Fix For: 3.3.0.M3
Attachments: ObserverInDecorator.png, ObserverInInterceptor.png
Test case:
EXECUTE: Create CDI project
EXECUTE: Create ObserverInDecorator class
{code}
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){
}
}
{code}
ASSERT: @Observes annotation should be marked by problem marker
EXECUTE: Point mouse to @Observes annotation
FAIL: Message is "Interceptor cannot have a method with a parameter annotated
@Observes"
EXECUTE: Create ObserverInInterceptor class
{code}
package org.test;
import javax.enterprise.event.Observes;
import javax.interceptor.Interceptor;
@Interceptor
@FooBinding
public class ObserverInInterceptor {
public void method(@Observes String param){
}
}
{code}
ASSERT: @Observes annotation should be marked by problem marker
EXECUTE: Point mouse to @Observes annotation
FAIL: Message is "Decorator cannot have a method with a parameter annotated
@Observes"
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira