Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-11-02 Thread Remi Forax
On 11/02/2012 11:44 PM, Joe Darcy wrote: On 10/15/2012 03:56 AM, Alan Bateman wrote: On 15/10/2012 11:28, Joel Borggrén-Franck wrote: On 10/15/2012 12:34 AM, David Holmes wrote: > Remi, > > This ship has sailed you can't recall it. CloneNotSupportedException > is a checked exception and needs

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-11-02 Thread Joe Darcy
On 10/15/2012 03:56 AM, Alan Bateman wrote: On 15/10/2012 11:28, Joel Borggrén-Franck wrote: On 10/15/2012 12:34 AM, David Holmes wrote: > Remi, > > This ship has sailed you can't recall it. CloneNotSupportedException > is a checked exception and needs to remain so for source and binary > com

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-16 Thread Remi Forax
s-dev-boun...@openjdk.java.net [core-libs-dev-boun...@openjdk.java.net] on behalf of Jeroen Frijters [jer...@sumatra.nl] Sent: Monday, October 15, 2012 9:30 PM To: Remi Forax Cc: David Holmes; core-libs-dev@openjdk.java.net Subject: RE: CloneNotSupportedException should extends RuntimeException not Exc

RE: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-15 Thread Jeroen Frijters
_ From: Remi Forax [fo...@univ-mlv.fr] Sent: Monday, October 15, 2012 7:08 PM To: Jeroen Frijters Cc: David Holmes; core-libs-dev@openjdk.java.net Subject: Re: CloneNotSupportedException should extends RuntimeException not Exception Hi Jeroen, On 10/15/2012 01:48 PM, Jeroen Frijters wrote:

RE: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-15 Thread Jeroen Frijters
October 15, 2012 7:08 PM To: Jeroen Frijters Cc: David Holmes; core-libs-dev@openjdk.java.net Subject: Re: CloneNotSupportedException should extends RuntimeException not Exception Hi Jeroen, On 10/15/2012 01:48 PM, Jeroen Frijters wrote: > The solution is actually pretty easy. Just deprecate

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-15 Thread Remi Forax
Hi Jeroen, On 10/15/2012 01:48 PM, Jeroen Frijters wrote: The solution is actually pretty easy. Just deprecate Object.clone() and add a new method to Object: protected final native Object shallowClone(); It doesn't require the useless Cloneable interface and doesn't conflate shallow and deep

RE: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-15 Thread Jeroen Frijters
dk.java.net] on behalf of Remi Forax [fo...@univ-mlv.fr] Sent: Monday, October 15, 2012 9:27 AM To: David Holmes Cc: core-libs-dev@openjdk.java.net Subject: Re: CloneNotSupportedException should extends RuntimeException not Exception On 10/15/2012 12:34 AM, David Holmes wrote: > Remi, > &

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-15 Thread David Holmes
On 15/10/2012 8:56 PM, Alan Bateman wrote: On 15/10/2012 11:28, Joel Borggrén-Franck wrote: On 10/15/2012 12:34 AM, David Holmes wrote: > Remi, > > This ship has sailed you can't recall it. CloneNotSupportedException > is a checked exception and needs to remain so for source and binary > compati

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-15 Thread Alan Bateman
On 15/10/2012 11:28, Joel Borggrén-Franck wrote: On 10/15/2012 12:34 AM, David Holmes wrote: > Remi, > > This ship has sailed you can't recall it. CloneNotSupportedException > is a checked exception and needs to remain so for source and binary > compatibility. > I see how this is source incomp

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-15 Thread Joel Borggrén-Franck
On 10/15/2012 12:34 AM, David Holmes wrote: > Remi, > > This ship has sailed you can't recall it. CloneNotSupportedException > is a checked exception and needs to remain so for source and binary > compatibility. > I see how this is source incompatible and also behaviorally incompatible in a fe

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-15 Thread Remi Forax
On 10/15/2012 12:34 AM, David Holmes wrote: Remi, This ship has sailed you can't recall it. CloneNotSupportedException is a checked exception and needs to remain so for source and binary compatibility. yes, it burns into flame :) too bad, I'm pretty sure that no-one (until now) use a catch

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-14 Thread David Holmes
Remi, This ship has sailed you can't recall it. CloneNotSupportedException is a checked exception and needs to remain so for source and binary compatibility. David On 15/10/2012 2:19 AM, Remi Forax wrote: Hi everybody, CloneNotSupportedException is thrown when a developer calls Object.clone

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-14 Thread Eamonn McManus
Brian Goetz writes: > try { clone() } > catch (RuntimeException e) { ... } > catch (CloneNotSupportedException e1) { } I guess that means the change is not binary compatible either, since before the change the second catch block would run but after it the first one would. Éamonn 2012/10/1

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-14 Thread Brian Goetz
I believe this change is not source compatible. If a user says: try { clone() } catch (RuntimeException e) { ... } catch (CloneNotSupportedException e1) { } this compiles today but would fail to compile under this change. On Oct 14, 2012, at 7:06 PM, Mike Duigou wrote: > Seems reasonab

Re: CloneNotSupportedException should extends RuntimeException not Exception

2012-10-14 Thread Mike Duigou
Seems reasonable to me at first glance. I am still reviewing this but wanted to add two clarify notes: - This change means that CloneNotSupportedException is no longer a checked exception. This change is generally harmless. - Cases where CloneNotSupportedException is being caught were probably

CloneNotSupportedException should extends RuntimeException not Exception

2012-10-14 Thread Remi Forax
Hi everybody, CloneNotSupportedException is thrown when a developer calls Object.clone() and forget to mark the current object as Cloneable. Because it's clearly a developer error, CloneNotSupportedException should be a subtype of RuntimeException and not of Exception. I believe this change i