ValueObject clone method deep copy destination incorrect
--------------------------------------------------------

         Key: XDT-1574
         URL: http://opensource.atlassian.com/projects/xdoclet/browse/XDT-1574
     Project: XDoclet
        Type: Bug
  Components: EJB Module  
    Versions: 1.2.3    
 Reporter: Frank Adcock
 Assigned to: xdoclet-devel (Use for new issues) 


In valueobject.xdt the clone method is assigning the deep copy parameters back 
to itself rather than to the resultant cloned object.

Ie.  Currently this.<blah> = tempData should be other.<blah> = tempData for all 
of the collection types.

Sorry but don't have access to CVS from here so am unable to provide 
appropriate diff or patch files.

>From line 1638 should be:

        //Anonymous block to protect from namespace collisions.

        <XDtEjbValueObj:collectionType/> tempData;

        

        tempData = wrapCollection(new 
<XDtEjbValueObj:concreteCollectionType/>());

        tempData.addAll(this.<XDtEjbValueObj:currentAggregateName 
plural="true"/>);

        other.<XDtEjbValueObj:currentAggregateName plural="true"/> = tempData;

        

        tempData = wrapCollection(new 
<XDtEjbValueObj:concreteCollectionType/>());

        tempData.addAll(this.added<XDtEjbValueObj:currentAggregateName 
plural="true"/>);

        other.added<XDtEjbValueObj:currentAggregateName plural="true"/> = 
tempData;

        

        tempData = wrapCollection(new 
<XDtEjbValueObj:concreteCollectionType/>());

        tempData.addAll(this.onceAdded<XDtEjbValueObj:currentAggregateName 
plural="true"/>);

        other.onceAdded<XDtEjbValueObj:currentAggregateName plural="true"/> = 
tempData;

        

        tempData = wrapCollection(new 
<XDtEjbValueObj:concreteCollectionType/>());

        tempData.addAll(this.removed<XDtEjbValueObj:currentAggregateName 
plural="true"/>);

        other.removed<XDtEjbValueObj:currentAggregateName plural="true"/> = 
tempData;

        

        tempData = wrapCollection(new 
<XDtEjbValueObj:concreteCollectionType/>());

        tempData.addAll(this.updated<XDtEjbValueObj:currentAggregateName 
plural="true"/>);

        other.updated<XDtEjbValueObj:currentAggregateName plural="true"/> = 
tempData;

        

        }

        </XDtEjbValueObj:ifIsCollection>


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



-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to