commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harry Levinson (Closed) (JIRA)" <>
Subject [jira] [Closed] (LANG-789) SerializationUtils clone method fails to perform some deep cloning
Date Thu, 01 Mar 2012 15:41:58 GMT


Harry Levinson closed LANG-789.

    Resolution: Not A Problem

Thanks Marcos, closing this issue now.

It turned out to be a bug in my code elsewhere, and not the clone "bug" issue I submitted.

I was able to run a version of your code that ran fine. Also fixed my own code and disabled
the clone workaround I developed for the child class, all works fine now.

Thanks again for looking at this, sorry to waste your time!

> SerializationUtils clone method fails to perform some deep cloning
> ------------------------------------------------------------------
>                 Key: LANG-789
>                 URL:
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.1
>         Environment: Windows 7, Java 7 (1.7.0_03), Apache Commons Lang 3.1, NetBeans
>            Reporter: Harry Levinson
>              Labels: ,, clone,, externalizable,, serializable
> SerializationUtils clone method fails to perform some deep cloning of at least some objects
containing Externalizable subobjects.
> Here is the @version text from the source file:
> 1199718 2011-11-09 12:43:20Z sebb $
> To reproduce possible bug:
> 1. Create two classes (let's call them Parent and Child) and mark both as "implements
> 2. Write required Externalizable methods readExternal and writeExternal
> 3. Make Child a private member/field of Parent
> 4. Write code to override toString if necessary for Parent and Child
> 5. Create a separate Java class to test creation and cloning of Parent and Child 
> 6. In the test class write to code to do this:
> a. Create a Parent object
> b. Create a Child object
> c. Attach Child to Parent via setter
> d. Print out Parent object
> e. Use SerializationUtils.clone() to clone Parent (call it ParentClone)
> f. Print ParentClone
> 7. Compare print output of Parent and ParentClone, observe that ParentClone does not
contain Child object

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message