RFR: JDK-8318854: [macos14] Running any AWT app prints Secure coding warning [v2]
Harshitha Onkar
honkar at openjdk.org
Wed Nov 29 17:44:09 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?
@mrserb
The question as to whether sharedDelegate can be null is answered as part of https://github.com/openjdk/jdk/pull/16569#discussion_r1399559545.
> 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?
As Kevin explained it earlier, it would be the responsibility of the toolkit that initialized NSApp to add system menu bar, dock menu (if any). This has been tested using variations of sample programs added to [JDK-8318854](https://bugs.openjdk.org/browse/JDK-8318854).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16569#discussion_r1409655375
More information about the client-libs-dev
mailing list