[
https://issues.apache.org/jira/browse/LABS-145?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan McKinley updated LABS-145:
-------------------------------
Attachment: LABS-145-generics.patch
This patch makes the base Factory generic.
The only weird bit is to get the setter method to work in spring, the setMap()
function could not be setMap( Map<String,T> ) rather it has to be:
{code:java}
@SuppressWarnings("unchecked")
public void setMap(Map map) {
this.map = (Map<String,T>)map;
}
{code}
otherwise you get an error in the spring initalization:
{panel}
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type
[org.apache.droids.handle.Save] to required type [org.apache.droids.api.Droid]
for property 'map[org.apache.droids.handle.Save]': no matching editors or
conversion strategy found
{panel}
> droids GenericFactory should be GenericFactory<T>
> -------------------------------------------------
>
> Key: LABS-145
> URL: https://issues.apache.org/jira/browse/LABS-145
> Project: Labs
> Issue Type: Improvement
> Components: Droids
> Reporter: Ryan McKinley
> Attachments: LABS-145-generics.patch
>
>
> The droids API will be a lot more clear if the factories have generic
> interfaces.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]