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

Daniel Azarov (JIRA) jira-events at lists.jboss.org
Fri Jul 29 17:37:23 EDT 2011


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

Daniel Azarov updated JBIDE-7680:
---------------------------------

    Description: 
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.jboss.jsr299.tck.tests.jbt.quickfixes;

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 (@Decorator and @Singleton) should be marked by problem marker
EXECUTE: Point mouse to @Decorator or @Singleton annotation
ASSERT: Text hover with "Delete @Decorator annotation from 'SessionBeanAnnotatedInterceptorBroken' class" appears

  was:This quick fix should offer to delete @Interceptor/@Decorator annotation or @Stateless annotation



> 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.x
>
>
> 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.jboss.jsr299.tck.tests.jbt.quickfixes;
> 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 (@Decorator and @Singleton) should be marked by problem marker
> EXECUTE: Point mouse to @Decorator or @Singleton annotation
> ASSERT: Text hover with "Delete @Decorator annotation from 'SessionBeanAnnotatedInterceptorBroken' class" appears

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the jbosstools-issues mailing list