Re: Time to retire System.runFinalizersOnExit?

2015-02-02 Thread Patrick Reinhart
Am 2.2.2015 um 09:09 schrieb Florian Weimer: On 01/30/2015 06:03 PM, Mandy Chung wrote: I see a few callers in Fedora in test suites, but only hsqldb as an actual user in the installed JAR files. Do you see any issue converting them? I haven't tried. I assume that any changes implemented

Re: Time to retire System.runFinalizersOnExit?

2015-02-02 Thread Florian Weimer
On 01/30/2015 06:03 PM, Mandy Chung wrote: I see a few callers in Fedora in test suites, but only hsqldb as an actual user in the installed JAR files. Do you see any issue converting them? I haven't tried. I assume that any changes implemented will actually increase resiliency of the test

Re: Time to retire System.runFinalizersOnExit?

2015-01-30 Thread Mandy Chung
On 1/30/15 3:04 AM, Florian Weimer wrote: On 01/27/2015 05:37 AM, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw UnsupportedOperationException. I believe it's

Re: Time to retire System.runFinalizersOnExit?

2015-01-30 Thread Florian Weimer
On 01/27/2015 05:37 AM, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw UnsupportedOperationException. I believe it's rare for existing applications using

Re: Time to retire System.runFinalizersOnExit?

2015-01-29 Thread Peter Levart
On 01/29/2015 08:34 AM, David Holmes wrote: Wouldn't it be possible to make the method safe? Finalizers are usually run against un-reachable objects. If the Shutdown sequence made sure all threads are stopped except the thread executing How do you propose to make sure all threads are stopped?

Re: Re: Time to retire System.runFinalizersOnExit?

2015-01-29 Thread Martin Desruisseaux
Le 29/01/15 04:43, Mandy Chung a écrit : Throwing UOE is intentional so that applications depending on existing behavior will be modified not to use this deprecated method. Making it a no-op makes it harder to diagnose for applications depending on the finalizers to be invoked on exit to

Re: Time to retire System.runFinalizersOnExit?

2015-01-28 Thread Paul Sandoz
On Jan 27, 2015, at 5:37 AM, Mandy Chung mandy.ch...@oracle.com wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw UnsupportedOperationException. I believe it's rare for

Re: Time to retire System.runFinalizersOnExit?

2015-01-28 Thread Alan Bateman
On 27/01/2015 04:37, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw UnsupportedOperationException. I believe it's rare for existing applications using

Re: Time to retire System.runFinalizersOnExit?

2015-01-28 Thread Stuart Marks
On 1/28/15 7:07 AM, Alan Bateman wrote: On 27/01/2015 04:37, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw UnsupportedOperationException. I believe it's rare

Re: Time to retire System.runFinalizersOnExit?

2015-01-28 Thread Mandy Chung
On 1/28/2015 5:36 PM, Stuart Marks wrote: On 1/28/15 7:07 AM, Alan Bateman wrote: On 27/01/2015 04:37, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw

Re: Time to retire System.runFinalizersOnExit?

2015-01-28 Thread Peter Levart
On 01/29/2015 04:43 AM, Mandy Chung wrote: On 1/28/2015 5:36 PM, Stuart Marks wrote: On 1/28/15 7:07 AM, Alan Bateman wrote: On 27/01/2015 04:37, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to

Re: Time to retire System.runFinalizersOnExit?

2015-01-28 Thread David Holmes
On 29/01/2015 5:06 PM, Peter Levart wrote: On 01/29/2015 04:43 AM, Mandy Chung wrote: On 1/28/2015 5:36 PM, Stuart Marks wrote: On 1/28/15 7:07 AM, Alan Bateman wrote: On 27/01/2015 04:37, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this

Re: Time to retire System.runFinalizersOnExit?

2015-01-28 Thread Paul Sandoz
On Jan 28, 2015, at 4:28 PM, Volker Simonis volker.simo...@gmail.com wrote: I understand that the benefits of calling System.runFinalizersOnExit() may be questionable and I don’t have any objections to remove it in Java 9. But I'm strongly against changing it to throw an

Re: Time to retire System.runFinalizersOnExit?

2015-01-28 Thread Volker Simonis
I understand that the benefits of calling System.runFinalizersOnExit() may be questionable and I don’t have any objections to remove it in Java 9. But I'm strongly against changing it to throw an UnsupportedOperationException and downport that change to Java 8. In my eyes that’s really a no-go.

Re: Time to retire System.runFinalizersOnExit?

2015-01-27 Thread Aleksey Shipilev
On 27.01.2015 07:37, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw UnsupportedOperationException. I believe it's rare for existing applications using

Re: Time to retire System.runFinalizersOnExit?

2015-01-27 Thread Peter Levart
On 01/27/2015 09:55 PM, Martin Buchholz wrote: If you want to ensure something is run before VM exit, add a shutdown hook. If you really want to run all the finalizers, you can always run a variant of GcFinalization in your shutdown hook, although as always running during shutdown increases

Re: Time to retire System.runFinalizersOnExit?

2015-01-27 Thread Martin Buchholz
If you want to ensure something is run before VM exit, add a shutdown hook. If you really want to run all the finalizers, you can always run a variant of GcFinalization in your shutdown hook, although as always running during shutdown increases the risk greatly. On Tue, Jan 27, 2015 at 6:48 AM,

Re: Time to retire System.runFinalizersOnExit?

2015-01-27 Thread Martin Buchholz
I was referring to http://code.google.com/p/guava-libraries/source/browse/guava-testlib/src/com/google/common/testing/GcFinalization.java which I occasionally advertise here. (but it's intended to be used for testing...) On Tue, Jan 27, 2015 at 2:00 PM, Peter Levart peter.lev...@gmail.com wrote:

Re: Time to retire System.runFinalizersOnExit?

2015-01-27 Thread Peter Levart
On 01/27/2015 01:54 PM, Peter Levart wrote: A poor-man's escape hatch is a shutdown hook that calls System.runFinalization(). Which might interfere with other shutdown hooks that run concurrently (runFinalizersOnExit runs finalizers after all shutdown hooks are finished). Not really. This

Re: Time to retire System.runFinalizersOnExit?

2015-01-27 Thread Peter Levart
On 01/27/2015 10:49 AM, Aleksey Shipilev wrote: On 27.01.2015 07:37, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw UnsupportedOperationException. I believe

Re: Time to retire System.runFinalizersOnExit?

2015-01-27 Thread Mandy Chung
On 1/27/2015 1:49 AM, Aleksey Shipilev wrote: On 27.01.2015 07:37, Mandy Chung wrote: System.runFinalizationOnExit has been deprecated since 1998 (JDK 1.2) and this method is inherently unsafe. I am thinking to propose this method in JDK 9 to throw UnsupportedOperationException. I believe