#25 InterFace isAssignableFrom Class

closed
None
5
2005-11-30
2005-11-24
No

Found by 'amare':

http://sourceforge.net/forum/message.php?msg_id=3442658

We make use of the BeanFactoryIF Iterface to create a
Custom Bean
Factory. The issue is that the object that the factory
creates is assigned to an Interface that the object
implements. The
net.sf.dozer.util.mapping.util.MappingUtils class
recieve this object and test if the object it recieved
isAssignableFrom the destination data object. (Line 616
net.sf.dozer.util.mapping.util.MappingUtils). This will
not be true as a object can never be assignable from a
Interface, even though the object implements the
interface. According to me this will work if the
current code:

(if
(!rvalue.getClass().isAssignableFrom(classMap.getDestClass().getClassToMap()))
{)is swapped around to if
(!classMap.getDestClass().getClassToMap().isAssignableFrom(rvalue.getClass()))

{

I have tested this one my side and it seems to solve my
issue of assigning the destination object to an interface.

Discussion

  • Franz Garsombke

    Franz Garsombke - 2005-11-24

    Logged In: YES
    user_id=550744

    This is fixed and in CVS.

     
  • Franz Garsombke

    Franz Garsombke - 2005-11-26
    • status: open --> pending
     
  • Franz Garsombke

    Franz Garsombke - 2005-11-30
    • status: pending --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks