[ 
https://issues.apache.org/struts/browse/WW-3083?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Musachy Barroso updated WW-3083:
--------------------------------

    Fix Version/s: 2.1.7

> Certain annotations should not only be inherited from their super class 
> package but also from their super class itself
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3083
>                 URL: https://issues.apache.org/struts/browse/WW-3083
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>            Reporter: Kris Coolsaet
>            Priority: Minor
>             Fix For: 2.1.7
>
>
> The API documentation of AnnotationTools.findAnnotation expected me to think 
> that  annotation were inherited.
> Example: assume mypackage.MyAction extends otherpackage.SuperAction
> If MyAction does not have a @ParentPackage annotation and SuperAction does, 
> then I had expected that the parent package of SuperAction would also be used 
> for MyAction. This is not the case. However, if the package-info.java of 
> otherpackage has a @ParentPackage annotation (and mypackage does not) then 
> that annotation is used also for MyAction. This distinction between classes 
> and the packages they belong to, feels counterintuitive.
> Apart from @ParentPackage, other annotations might benifit from inheritance 
> as well, e.g., @InterceptorRef.
> There are two ways to implement this requested behavior: add and @Inherited 
> (meta-)annotation to the annotations, or reimplement 
> AnnotationTools.findAnnotation to also look at the annotations of the super 
> class. (The latter solution would however not distinguish between different 
> types of annotation.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to