[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-6957) Erroneous error about decorators and delegate types
Alexey Kazakov (JIRA)
jira-events at lists.jboss.org
Wed Sep 1 10:35:13 EDT 2010
[ https://jira.jboss.org/browse/JBIDE-6957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12548342#action_12548342 ]
Alexey Kazakov commented on JBIDE-6957:
---------------------------------------
Yes, according to Java Language spec. Boo is a superinterface of FooBar, not a superclass. And Boo is a bean type of FooDecorator managed bean. So it must be a decorated type of FooDecorator decorator. But TCK in DecoratorDefinitionTest.testDecoratedTypes() (8.1 b) has following assertions:
public void testDecoratedTypes()
{
List<Decorator<?>> decorators = getCurrentManager().resolveDecorators(FooBar.TYPES);
assert decorators.size() == 1;
assert decorators.get(0).getDecoratedTypes().size() == 3;
assert decorators.get(0).getDecoratedTypes().contains(Foo.class);
assert decorators.get(0).getDecoratedTypes().contains(Bar.class);
assert decorators.get(0).getDecoratedTypes().contains(Baz.class);
assert !decorators.get(0).getDecoratedTypes().contains(Serializable.class);
assert !decorators.get(0).getDecoratedTypes().contains(FooDecorator.class);
assert !decorators.get(0).getDecoratedTypes().contains(AbstractFooDecorator.class);
assert !decorators.get(0).getDecoratedTypes().contains(Boo.class);
}
Pete, why Boo is not a decorated type?
> Erroneous error about decorators and delegate types
> ---------------------------------------------------
>
> Key: JBIDE-6957
> URL: https://jira.jboss.org/browse/JBIDE-6957
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: cdi (jsr-299)
> Affects Versions: 3.2.0.M1
> Reporter: Pete Muir
> Assignee: Viacheslav Kabanovich
> Fix For: 3.2.0.Beta
>
>
> Given a decorator like
> @Decorator
> public abstract class FloodingDecorator implements CodeFragmentManager, Serializable
> {
> private static final long serialVersionUID = -4615837206290420112L;
> @Inject @Delegate
> private CodeFragmentManager codeFragmentManager;
> }
> JBoss Tools errors, telling me "The delegate type must implement or extend the decorated type Serializable [JSR-299 §8.1.3]"
> However, it doesn't have to implement serializable - the delegate type must be one of the decorated types, not all of them
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbosstools-issues
mailing list