[jbosstools-issues] [JBoss JIRA] (JBIDE-7680) Quick fix for "Bean class of a session bean cannot be annotated @Interceptor/@Decorator [JSR-299 §3.2]" error markers

Isaac Rooskov (JIRA) jira-events at lists.jboss.org
Wed Apr 11 23:24:47 EDT 2012


     [ https://issues.jboss.org/browse/JBIDE-7680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Isaac Rooskov updated JBIDE-7680:
---------------------------------

    Release Notes Docs Status: Not Required
                       Writer: irooskov


Release note not required for sub-tasks
                
> Quick fix for "Bean class of a session bean cannot be annotated @Interceptor/@Decorator [JSR-299 §3.2]" error markers
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-7680
>                 URL: https://issues.jboss.org/browse/JBIDE-7680
>             Project: Tools (JBoss Tools)
>          Issue Type: Sub-task
>          Components: CDI
>            Reporter: Daniel Azarov
>            Assignee: Daniel Azarov
>              Labels: new_and_noteworthy
>             Fix For: 3.3.0.M3
>
>         Attachments: SessionBeanAnnotatedDecorator1.png, SessionBeanAnnotatedDecorator2.png, SessionBeanAnnotatedInterceptor1.png, SessionBeanAnnotatedInterceptor2.png
>
>
> This quick fix should offer to delete @Interceptor/@Decorator annotation
> Test case:
> EXECUTE: Create CDI project
> EXECUTE: Create SessionBeanAnnotatedDecoratorBroken class
> {code}
> package org.test;
> import javax.decorator.Decorator;
> import javax.ejb.Stateless;
> @Decorator
> @Stateless
> public class SessionBeanAnnotatedDecoratorBroken {
> }
> {code}
> ASSERT: Both annotations (@Decorator and @Stateless) should be marked by problem marker
> EXECUTE: Point mouse to @Decorator or @Stateless annotation
> ASSERT: Text hover with "Delete @Decorator annotation from 'SessionBeanAnnotatedDecoratorBroken' class" appears
> EXECUTE: Create SessionBeanAnnotatedInterceptorBroken class
> {code}
> package org.test;
> import javax.ejb.Singleton;
> import javax.interceptor.AroundInvoke;
> import javax.interceptor.Interceptor;
> import javax.interceptor.InvocationContext;
> @Interceptor
> @Singleton
> public class SessionBeanAnnotatedInterceptorBroken {
> 	@AroundInvoke
> 	public Object alwaysReturnThis(InvocationContext ctx) throws Exception {
> 		return ctx.proceed();
> 	}
> }
> {code}
> ASSERT: Both annotations (@Interceptor and @Singleton) should be marked by problem marker
> EXECUTE: Point mouse to @Interceptor or @Singleton annotation
> ASSERT: Text hover with "Delete @Interceptor annotation from 'SessionBeanAnnotatedInterceptorBroken' class" appears

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jbosstools-issues mailing list