RFR: JDK-8318854: [macos14] Running any AWT app prints Secure coding warning [v2]
Kevin Rushforth
kcr at openjdk.org
Fri Nov 10 14:10:00 UTC 2023
The message from this sender included one or more files
which could not be scanned for virus detection; do not
open these files unless you are certain of the sender's intent.
----------------------------------------------------------------------
On Fri, 10 Nov 2023 03:02:30 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:
>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> local var reused
>
> src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m line 844:
>
>> 842: }
>> 843:
>> 844: if (menuBar == nil && [ApplicationDelegate sharedDelegate] != nil) {
>
> Can you please provide details on how the delegate can be null here and there if it should be set at the startup of any awt application?
It can be null if the NSApplication was created by code outside of AWT. Specifically, in the case of an FX or SWT toolkit, but in theory a native application using JAWT could do this.
In practice, since we haven't even seen a crash as a result of this, I doubt that this code is ever called if AWT isn't running the event loop and hasn't installed their delegate.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16569#discussion_r1389448038
More information about the client-libs-dev
mailing list