You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openwebbeans.apache.org by "Arne Limburg (JIRA)" <ji...@apache.org> on 2011/04/20 18:24:05 UTC

[jira] [Created] (OWB-568) Decorater for generic Interfaces does not work

Decorater for generic Interfaces does not work
----------------------------------------------

                 Key: OWB-568
                 URL: https://issues.apache.org/jira/browse/OWB-568
             Project: OpenWebBeans
          Issue Type: Bug
          Components: Interceptor and Decorators
    Affects Versions: 1.1.0
            Reporter: Arne Limburg
            Assignee: Gurkan Erdogdu


When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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

[jira] [Assigned] (OWB-568) Decorater for generic Interfaces does not work

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg reassigned OWB-568:
---------------------------------

    Assignee: Mark Struberg  (was: Gurkan Erdogdu)

> Decorater for generic Interfaces does not work
> ----------------------------------------------
>
>                 Key: OWB-568
>                 URL: https://issues.apache.org/jira/browse/OWB-568
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.1.0
>            Reporter: Arne Limburg
>            Assignee: Mark Struberg
>         Attachments: OWB-568.patch, OWB-568.zip
>
>
> When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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

[jira] [Commented] (OWB-568) Decorater for generic Interfaces does not work

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036770#comment-13036770 ] 

Mark Struberg commented on OWB-568:
-----------------------------------

Digging deeper into this revealed a few other issues. In general I'd like to note that all the Generic Interceptor stuff is highly accademical imo, because only @Dependent beans might be generics at all!

See section 3.1 of the spec:
> 3.1. Managed beans
> ...
> If the managed bean class is a generic type, it must have scope @Dependent. 
> If a managed bean with a parameterized bean class declares any scope other than @Dependent, 
> the container automatically detects the problem and treats it as a definition error.

Thus it's only possible to decorate @Dependent generic beans which kinda sucks ;)


> Decorater for generic Interfaces does not work
> ----------------------------------------------
>
>                 Key: OWB-568
>                 URL: https://issues.apache.org/jira/browse/OWB-568
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.1.0
>            Reporter: Arne Limburg
>            Assignee: Mark Struberg
>         Attachments: OWB-568.patch, OWB-568.zip
>
>
> When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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

[jira] [Updated] (OWB-568) Decorater for generic Interfaces does not work

Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arne Limburg updated OWB-568:
-----------------------------

    Attachment: OWB-568.zip

> Decorater for generic Interfaces does not work
> ----------------------------------------------
>
>                 Key: OWB-568
>                 URL: https://issues.apache.org/jira/browse/OWB-568
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.1.0
>            Reporter: Arne Limburg
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-568.zip
>
>
> When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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

[jira] [Commented] (OWB-568) Decorater for generic Interfaces does not work

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036778#comment-13036778 ] 

Mark Struberg commented on OWB-568:
-----------------------------------

Just to clarify my previous sentence:

@ApplicationScoped
public class Zoo<?> { ..

is illegal, but  

@ApplicationScoped
public class ViennaZoo extends Zoo<Vienna> { ..

is fine.

> Decorater for generic Interfaces does not work
> ----------------------------------------------
>
>                 Key: OWB-568
>                 URL: https://issues.apache.org/jira/browse/OWB-568
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.1.0
>            Reporter: Arne Limburg
>            Assignee: Mark Struberg
>         Attachments: OWB-568.patch, OWB-568.zip
>
>
> When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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

[jira] [Updated] (OWB-568) Decorater for generic Interfaces does not work

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Struberg updated OWB-568:
------------------------------

    Fix Version/s:     (was: 1.1.1)
                   1.2.0

> Decorater for generic Interfaces does not work
> ----------------------------------------------
>
>                 Key: OWB-568
>                 URL: https://issues.apache.org/jira/browse/OWB-568
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.1.0
>            Reporter: Arne Limburg
>            Assignee: Mark Struberg
>             Fix For: 1.2.0
>
>         Attachments: OWB-568.patch, OWB-568.zip
>
>
> When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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

        

[jira] [Commented] (OWB-568) Decorater for generic Interfaces does not work

Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13022195#comment-13022195 ] 

Arne Limburg commented on OWB-568:
----------------------------------

The patch is against the 1.1.0 tag. It fixes one problem, but another is still remaining.

> Decorater for generic Interfaces does not work
> ----------------------------------------------
>
>                 Key: OWB-568
>                 URL: https://issues.apache.org/jira/browse/OWB-568
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.1.0
>            Reporter: Arne Limburg
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-568.patch, OWB-568.zip
>
>
> When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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

[jira] [Updated] (OWB-568) Decorater for generic Interfaces does not work

Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OWB-568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Arne Limburg updated OWB-568:
-----------------------------

    Attachment: OWB-568.patch

> Decorater for generic Interfaces does not work
> ----------------------------------------------
>
>                 Key: OWB-568
>                 URL: https://issues.apache.org/jira/browse/OWB-568
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.1.0
>            Reporter: Arne Limburg
>            Assignee: Gurkan Erdogdu
>         Attachments: OWB-568.patch, OWB-568.zip
>
>
> When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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

[jira] [Commented] (OWB-568) Decorater for generic Interfaces does not work

Posted by "Arne Limburg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OWB-568?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13036788#comment-13036788 ] 

Arne Limburg commented on OWB-568:
----------------------------------

As you wrote, it's not that academic at all, because beans may implement generic interfaces and generic decorators seem to be valid as of the example in 1.3.7 of the spec.

Your bean ViennaZoo may be decorated by the following decorator

@Decorator
public class CityZooDecorator<C extends City> implements Zoo<C>

    @Inject @Delegate
    private Zoo<C> delegate;

    ...
}

But I guess this decorator would not applied to the bean
@ApplicationScoped
public class Parliament implements Zoo<Germany> {
    ...
}
since germany is not a city.

> Decorater for generic Interfaces does not work
> ----------------------------------------------
>
>                 Key: OWB-568
>                 URL: https://issues.apache.org/jira/browse/OWB-568
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Interceptor and Decorators
>    Affects Versions: 1.1.0
>            Reporter: Arne Limburg
>            Assignee: Mark Struberg
>         Attachments: OWB-568.patch, OWB-568.zip
>
>
> When a Decorator implements an interface with a generic type argument, the check to compare the decorator type and the type of the delegate injection point always fails.

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