RFR: 8305083: Remove finalize() from test/hotspot/jtreg/vmTestbase/nsk/share/ and /jpda that are used in serviceability/dcmd/framework tests [v4]
Afshin Zafari
duke at openjdk.org
Tue May 9 08:45:46 UTC 2023
On Sun, 7 May 2023 21:58:16 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Afshin Zafari has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits:
>>
>> - Merge branch 'master' into _8305083
>> - 8305083: 8305083: Remove finalize() from test/hotspot/jtreg/vmTestbase/nsk/share/ and /jpda that are used in serviceability/dcmd/framework tests
>> - 8305083: Remove finalize() from test/hotspot/jtreg/vmTestbase/nsk/share/ and /jpda that are used in serviceability/dcmd/framework tests
>> - 8305083: Remove finalize() from test/hotspot/jtreg/vmTestbase/nsk/share/ and /jpda that are used in serviceability/dcmd/framework tests
>
> test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java line 89:
>
>> 87: this.log = binder.getLog();
>> 88:
>> 89: // As the alternative to finalize(), register the cleanup() method
>
> No need to say "As an alternative to finalize()".
Done.
> test/hotspot/jtreg/vmTestbase/nsk/share/jpda/DebugeeProcess.java line 91:
>
>> 89: // As the alternative to finalize(), register the cleanup() method
>> 90: // to be called when this instance becomes unreachable.
>> 91: Cleaner.create().register(this, () -> cleanup());
>
> Why do we need to do this explicitly here? Why not call `registerCleaner`?
Was remained from the former solution. `registerCleanup()` is called.
> test/hotspot/jtreg/vmTestbase/nsk/share/jpda/SocketIOPipe.java line 26:
>
>> 24:
>> 25: import java.io.IOException;
>> 26: import java.lang.ref.Cleaner;
>
> Not needed.
Done.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13420#discussion_r1188317414
PR Review Comment: https://git.openjdk.org/jdk/pull/13420#discussion_r1188322181
PR Review Comment: https://git.openjdk.org/jdk/pull/13420#discussion_r1188319200
More information about the hotspot-runtime-dev
mailing list