[
https://issues.apache.org/jira/browse/WINK-333?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bryant Luk updated WINK-333:
----------------------------
Attachment: 0001-Update-WADLGenerator-to-handle-DynamicResources.patch
When I originally applied your suggestion, there were a few unit test failures
because they didn't expect a path for DynamicResources. Instead I created a
patch that should do something similar. Please let me know if this acceptable.
Thanks.
> WadlGenerator and ResourceMetadataCollector don't properly process
> DynamicResources.
> ------------------------------------------------------------------------------------
>
> Key: WINK-333
> URL: https://issues.apache.org/jira/browse/WINK-333
> Project: Wink
> Issue Type: Bug
> Components: Common
> Affects Versions: 1.1.2
> Environment: all
> Reporter: Jim Long
> Attachments:
> 0001-Update-WADLGenerator-to-handle-DynamicResources.patch
>
>
> DynamicResources use getPath() to hold metadata, rather than using the @Path
> annotation.
> When processing a DynamicResource with WadlGenerator.generate() the resulting
> XML is fine except for the path, which is blank.
> I added the following to the beginning of
> ResourceMetadatCollector.parsePath(), and it seems to work.
> if (DynamicResource.class.isAssignableFrom(cls)) {
> try {
> DynamicResource dynRes = (DynamicResource)cls.newInstance();
> String path = dynRes.getPath();
> getMetadata().addPath(path);
> logger.trace("parseClass() returning true for class
> DynamicResource");
> return true;
> } catch (Exception e) {
> // Drop through and look for @Path annotation.
> }
> }
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira