[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Re: RFR: JDK-8318854: [macos14] Running any AWT app prints Secure coding warning [v2]
From:       Harshitha Onkar <honkar () openjdk ! org>
Date:       2023-11-29 17:44:09
Message-ID: Oesztm_XSqkwDEQlu_vMOUi5XQ2O859OMV2RkrfeZy4=.a51135fe-3071-4518-b4a2-8aea3b6700a6 () github ! com
[Download RAW message or body]

On Wed, 29 Nov 2023 07:14:17 GMT, Sergey Bylokhov <serb@openjdk.org> wrote:

> > I found a reason in one comment above.
> 
> I guess the code [ApplicationDelegate.m](https://github.com/openjdk/jdk/blob/5493f5f \
> 92d569d8e94d1f271480f11c48257e896/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/5493f5f \
> 92d569d8e94d1f271480f11c48257e896/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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic