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

Thomas Vandahl closed TRB-11.
-----------------------------


Fixed in Fulcrum-Intake 1.0.6

> Intake, mapToObject, and using Interfaces
> -----------------------------------------
>
>                 Key: TRB-11
>                 URL: https://issues.apache.org/jira/browse/TRB-11
>             Project: Turbine
>          Issue Type: Improvement
>          Components: Fulcrum
>         Environment: PC / RedHat
>            Reporter: Scott Eade
>            Assignee: Thomas Vandahl
>            Priority: Minor
>         Attachments: Group.interfaces.diffs
>
>
> This is/was bugzilla bug #12661. Moving it to Scarab.
> Short version: Intake won't use interfaces for the mapTo 
> Attached is a patch that provides this.
> Details:
> I've been using Intake quite successfully until a recent change I
>  made in my code. The mapTo object is a configuration object that
>  does the PropertyChange and VetoableChange JavaBean pattern and it
>  got rather tedious. So I switched to using an dynamic Proxy
> (java.lang.reflect.Proxy). Testing with regular Java classes it works
> great.
> Following the code, Intake.mapTo(Retrievable) uses the Retrievable's
> classname (and superclasses) as the key into a Map for fields (and
> ultimately their setter/getters. The dynamic Proxy is initialized by
> providing an interface. Sun's implementation in the JDK auto-creates
> a new class that implements the interface as well as extending Object
> while naming the class Proxy0 (as in zero, not oh). Therefore, the
> proxied object ends up with a name not known to Intake yet
> implementing an interface. So Group.init(Retrievable)'s logic of
> chasing the classes and superclasses won't find any fields for the
> class.
> Wow, from bugzilla to Scarab to JIRA.  Issue raised by Evan Koffler 
> ([email protected]).

-- 
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