What steps will reproduce the problem?
1. Create a Parent object that contains a List of Child objects.
2. Create a Child object has a reference to its Parent.
3. Parent parent = null;
4. Child child = null;
5. parent.addChild(child);
6. child.setParent(parent);
7. cloner.deepClone(child);
What is the expected output? What do you see instead?
The cloned instance of child has a new copy of parent with a list of copies of
child.
I would like the cloner to ignore the "parent" field in the child instance and
not clone it.
What version of the product are you using?
1.9.0
On what operating system?
Win 7 Enterprise
Please provide any additional information below.
I tried to use the following:
cloner.registerConstant(Child.class, "parent");
But because "parent" is an instance field and not static (i.e. constant) I get
a NullPointerException.
Original issue reported on code.google.com by waul...@gmail.com on 10 Dec 2013 at 10:10
Original issue reported on code.google.com by
waul...@gmail.com
on 10 Dec 2013 at 10:10