RFR: 8332631: Update nsk.share.jpda.BindServer to don't use finalization
Chris Plummer
cjplummer at openjdk.org
Wed May 22 16:42:02 UTC 2024
On Tue, 21 May 2024 19:55:01 GMT, Leonid Mesnik <lmesnik at openjdk.org> wrote:
> The BindServer starts several threads and opens streams.
>
> It registered them for cleanup using "Finalizer" from nsk.share.framework. Currently, it cleanup resources during shutdown hook.
>
> This fix changes BindServer to explicitly close streams and finish threads after test is completed. The exceptions are just printed like it was done previously. I haven't caught any exception during in close method during testing.
Looks good. Just one minor comment suggestion.
test/hotspot/jtreg/vmTestbase/nsk/share/jpda/BindServer.java line 634:
> 632: /**
> 633: * Close thread by closing all connections and waiting
> 634: * for thread finished.
Suggestion:
* for thread to finish.
-------------
Marked as reviewed by cjplummer (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19335#pullrequestreview-2071799883
PR Review Comment: https://git.openjdk.org/jdk/pull/19335#discussion_r1610313535
More information about the serviceability-dev
mailing list