RFR: 8362291: [macOS] Remove finalize method in CGraphicsEnvironment.java [v2]
Phil Race
prr at openjdk.org
Wed Jul 16 22:34:02 UTC 2025
On Wed, 16 Jul 2025 22:04:29 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8362291
>
> src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java line 157:
>
>> 155: deregisterDisplayReconfiguration(displayReconfigContext);
>> 156: } catch (Throwable t) {
>> 157: // Runs on disposer thread, can't allow an exception to escape.
>
> What do you think about moving this "catch Throwable" into Disposer itself? As of now since https://github.com/openjdk/jdk/pull/9890 we ignore "Exception" only.
I can do that. I can't think of a problem with it.
I should probably then do the same for the other catches of Exception in that file.
I'm a bit on the fence about whether I should
1. keep the print statements there
2. remove them
3. hide them behind a debugging option
I think I'll leave them alone and if we need to we can adjust in another PR.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26332#discussion_r2211734473
More information about the client-libs-dev
mailing list