RFR: JDK-8318854: [macos14] Running any AWT app prints Secure coding warning [v2]
Kevin Rushforth
kcr at openjdk.org
Wed Nov 29 16:00:16 UTC 2023
On Wed, 29 Nov 2023 07:14:17 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> I found a reason in one comment above.
>
> I guess the code [ApplicationDelegate.m](https://github.com/openjdk/jdk/blob/5493f5f92d569d8e94d1f271480f11c48257e896/src/java.desktop/macosx/native/libawt_lwawt/awt/ApplicationDelegate.m#L118C4-L128C33) should be changed. Right now it has some checks to prevent "double initialization", but it should take care about the case if the delegate is set already by some external lib.
> Leaving that as null and skip it in the code means that part of the API will stop working, mostly java.awt.desktop package?
I don't think any further changes are needed to this PR. It's already the case that if another toolkit or the app itself initializes the NSApplication, certain things won't be available in AWT. The system menu bar for example will belong to the toolkit that initializes the NSApplication. That was true before this change and it is still true.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16569#discussion_r1409505240
More information about the client-libs-dev
mailing list