[jbosstools-issues] [JBoss JIRA] Updated: (JBIDE-8695) Seam Solder generic bean validation.

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Wed Jun 22 16:30:23 EDT 2011


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

Viacheslav Kabanovich updated JBIDE-8695:
-----------------------------------------

    Description: 
The type produced by generic configuration point must be the type declared in generic configuration annotation.

1. If we have the following generic configuration annotation:
{code:title=ACMEQueue.java|borderStyle=solid}
@Retention(RUNTIME)
@GenericType(MessageSystemConfiguration.class)
@interface ACMEQueue {
    String name();
}
{code}
then the related configuration points must produce beans with the same type:
{code:title=MyMessageQueues.java|borderStyle=solid}
class MyMessageQueues {

    @Produces
    @ACMEQueue("defaultQueue")
    MessageSystemConfiguration defaultQueue = new MessageSystemConfiguration();
...
{code}

2. If several generic beans have the same set of qualifiers, then
a) These generic beans should be marked as incorrect: "Several generic beans for the same generic type have the same set of qualifiers."
b) In ambiguous injection points related to those generic beans, this statement should be added to the standard statement.

3. If a bean is annotated with @GenericConfiguration(SomeType.class) where annotation type SomeType is not annotated with @GenericType, it is marked as incorrect "Annotation type mismatch: SomeType is not a generic configuration annotation.".
4. If a generic configuration annotation is annotated with @GenericType(SomeGenericBean.class), it is marked with as incorrect: "Generic configuration types may not be generic beans.".

  was:
The type produced by generic configuration point must be the type declared in generic configuration annotation.

1. If we have the following generic configuration annotation:
{code:title=ACMEQueue.java|borderStyle=solid}
@Retention(RUNTIME)
@GenericType(MessageSystemConfiguration.class)
@interface ACMEQueue {
    String name();
}
{code}
then the related configuration points must produce beans with the same type:
{code:title=MyMessageQueues.java|borderStyle=solid}
class MyMessageQueues {

    @Produces
    @ACMEQueue("defaultQueue")
    MessageSystemConfiguration defaultQueue = new MessageSystemConfiguration();
...
{code}

2. If several generic beans have the same set of qualifiers, then
a) These generic beans should be marked as incorrect: "Several generic beans for the same generic type have the same set of qualifiers."
b) In ambiguous injection points related to those generic beans, this statement should be added to the standard statement.




> Seam Solder generic bean validation.
> ------------------------------------
>
>                 Key: JBIDE-8695
>                 URL: https://issues.jboss.org/browse/JBIDE-8695
>             Project: Tools (JBoss Tools)
>          Issue Type: Sub-task
>          Components: cdi (jsr-299)
>            Reporter: Alexey Kazakov
>            Assignee: Viacheslav Kabanovich
>              Labels: new_and_noteworthy
>             Fix For: 3.3.x
>
>
> The type produced by generic configuration point must be the type declared in generic configuration annotation.
> 1. If we have the following generic configuration annotation:
> {code:title=ACMEQueue.java|borderStyle=solid}
> @Retention(RUNTIME)
> @GenericType(MessageSystemConfiguration.class)
> @interface ACMEQueue {
>     String name();
> }
> {code}
> then the related configuration points must produce beans with the same type:
> {code:title=MyMessageQueues.java|borderStyle=solid}
> class MyMessageQueues {
>     @Produces
>     @ACMEQueue("defaultQueue")
>     MessageSystemConfiguration defaultQueue = new MessageSystemConfiguration();
> ...
> {code}
> 2. If several generic beans have the same set of qualifiers, then
> a) These generic beans should be marked as incorrect: "Several generic beans for the same generic type have the same set of qualifiers."
> b) In ambiguous injection points related to those generic beans, this statement should be added to the standard statement.
> 3. If a bean is annotated with @GenericConfiguration(SomeType.class) where annotation type SomeType is not annotated with @GenericType, it is marked as incorrect "Annotation type mismatch: SomeType is not a generic configuration annotation.".
> 4. If a generic configuration annotation is annotated with @GenericType(SomeGenericBean.class), it is marked with as incorrect: "Generic configuration types may not be generic beans.".

--
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