RFR: jsr166 jdk9 integration wave 2
Martin Buchholz
martinrb at google.com
Wed Nov 25 00:59:27 UTC 2015
On Tue, Nov 24, 2015 at 2:30 PM, Peter Levart <peter.levart at gmail.com>
wrote:
>
> What do you think of exception cloning?
>
>
Making copies of java objects has historically been troublesome (e.g.
Cloneable). I have made clones of objects often in tests via
deserialization + reserialization, but never in serious code. So I'm
hesitant. We could try to make the serial clone + addSuppressed, and fall
back to the original exception in case of failure. This might work well in
practice. We might also discover lots of latent serialization bugs in
exceptions. Has decades of RMI caught most of the problems with this
approach? Can we have a serialization expert bless this?
More information about the core-libs-dev
mailing list