[plugin-struts] StrutsConfigXMLPlugin should not be limited to classes that 
extend "Action" only
------------------------------------------------------------------------------------------------

         Key: XDP-86
         URL: http://jira.codehaus.org/browse/XDP-86
     Project: XDoclet 2 Plugins
        Type: Bug
 Reporter: Renaud Bruyeron



At the moment, StrutsConfigXMLPlugin only processes classes that are direct 
subclasses of org.apache.struts.action.Action
This does not work when we use other subclasses of Action, such as 
DispatchAction, etc.

The code is this:
    public Collection getActionClasses() {
                if (actionClasses == null) {
                        this.actionClasses = 
CollectionUtils.select(metadataProvider.getMetadata(), new 
IsA(ACTION_CLASSNAME));
                }
                return this.actionClasses;
    }
I don't think this is the right place to do this. This method should simple 
return metadataProvider.getMetadata(), and then it should be up to the build 
manager to filter the right files from the ant file. I don't think it is 
possible to do this filtering reliably inside xdoclet2 using the QDox provider, 
since QDox only knows the source (and therefore only knows about the first 
level up the hierarchy).

Therefore I think the correct implementation should be this:
    public Collection getActionClasses() {
        return metadataProvider.getMetadata();
    }

I believe the same issue is there for the getActionFormClasses(), and the fix 
is the same. 
Same problem in StrutsValidationXMLPlugin as well.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to