Closed GoogleCodeExporter closed 9 years ago
Unfortunatelly I had to exclude deep clone library from project due to this
stack issue. I used instead SerializationUtils.clone() from apache commons
lang3 library. That worked good in my case because I could implement
Serializable interface on each domain class.
Original comment by Dzafar.S...@gmail.com
on 14 Nov 2012 at 6:56
the clone algorithm is by it's nature recursive. To do iterative approach will
make the code very complicated and probably much slower.
StackOverflow problems arise with objects that look like a list of nodes and
not a graph of objects. I.e. an object "graph" that looks like
head->tail>tail2>tail3>tail4
will require 5 recursive calls where as a graph of
head
| \ \
tail1 tail2 tail3
will require just 2.
If you could find which of your objects look like a linked list, then you could
create a FastCloner like the FastClonerLinkedList and the problem will be solved
Original comment by kostas.k...@googlemail.com
on 7 Dec 2012 at 8:34
Original comment by kostas.k...@googlemail.com
on 7 Dec 2012 at 8:34
Original issue reported on code.google.com by
Dzafar.S...@gmail.com
on 8 Nov 2012 at 11:04