RFR: 8362291: [macOS] Remove finalize method in CGraphicsEnvironment.java

Sergey Bylokhov serb at openjdk.org
Wed Jul 16 00:12:38 UTC 2025


On Tue, 15 Jul 2025 22:39:48 GMT, Phil Race <prr at openjdk.org> wrote:

>> src/java.desktop/macosx/classes/sun/awt/CGraphicsEnvironment.java line 153:
>> 
>>> 151:         }
>>> 152: 
>>> 153:         public synchronized void dispose() {
>> 
>> Why the method is synchronized? we can call it on a different threads via Disposer?
>
> It doesn't have to be. Is it a problem that it is ?

Yeah, if it does not need to be, we can skip it; otherwise, we can update all existing implementations to follow the same pattern.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/26332#discussion_r2208933608


More information about the client-libs-dev mailing list