[jbosstools-issues] [JBoss JIRA] (JBIDE-23175) Validation of RetentionPolicy

Lukáš Valach (JIRA) issues at jboss.org
Thu Sep 15 11:43:00 EDT 2016


Lukáš Valach created JBIDE-23175:
------------------------------------

             Summary: Validation of RetentionPolicy
                 Key: JBIDE-23175
                 URL: https://issues.jboss.org/browse/JBIDE-23175
             Project: Tools (JBoss Tools)
          Issue Type: Bug
          Components: cdi-extensions
    Affects Versions: 4.4.1.Final
            Reporter: Lukáš Valach


The DeltaSpike sometimes requires to create new annotation. There are "parameter binding annotation" and "security binding annotation" in security module ([doc|https://deltaspike.apache.org/documentation/security.html]). If the anotation haven't this repention policy,then the annotation doesn't works ([explanation|http://stackoverflow.com/questions/3107970/how-do-different-retention-policies-affect-my-annotations]).

This is a valid annotation

{code:java}
@Retention(value = RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
@SecurityBindingType
public @interface CustomSecurityBinding {
}
{code}

and this doesn't work

{code:java}
//@Retention(value = RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE, ElementType.METHOD})
@Documented
@SecurityBindingType
public @interface CustomSecurityBinding {
}
{code}


I am not sure if that can be or should be validated. 



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)



More information about the jbosstools-issues mailing list