[11] RFR JDK-8198249: Remove deprecated Runtime::runFinalizersOnExit and System::runFinalizersOnExit

mandy chung mandy.chung at oracle.com
Fri Feb 16 18:24:24 UTC 2018



On 2/16/18 4:54 AM, David Holmes wrote:
> On 16/02/2018 10:12 PM, Alan Bateman wrote:
>> On 16/02/2018 04:09, mandy chung wrote:
>>>
>>> Merged.  New version:
>>> http://cr.openjdk.java.net/~mchung/jdk11/webrevs/8198249/webrev.02/
>> Good to see this change.
>>
>> One comment on Runtime.exec is that the 3rd paragraph of the updated 
>> spec is difficult to read (too many "ifs" and "thens"). What would 
>> you think about starting it with: "If this method is invoked after 
>> the virtual machine has started the shutdown hooks, the shutdown 
>> hooks have already run, and the status is nonzero, then this method 
>> halts the virtual machine with the given status code".
>
> I already suggested something even simpler :) If the hooks have 
> already run then they must have been started so the first part is 
> redundant. But I don't think we care about whether they have finished 
> running, only that they have started.
>

I like the simplified version that David suggests.  The phrase about 
"already run" is redundant there.  I will go with this version and 
finalize the CSR.

   * <p> If this method is invoked after the virtual machine has started
   * shutdown hooks and the status is nonzero then this method halts the
   * virtual machine with the given status code. Otherwise, this method
   * blocks indefinitely.

I'll look into the Shutdown implementation and address David's other 
comments separately.

Thanks.
Mandy


More information about the core-libs-dev mailing list