RFR: 8278021: Fix warnings in macOS glass native code and treat warnings as errors [v4]

Kevin Rushforth kcr at openjdk.org
Fri Feb 2 22:20:07 UTC 2024


On Fri, 2 Feb 2024 22:06:41 GMT, Martin Fox <mfox at openjdk.org> wrote:

> > So basically, a pragma to workaround a limitation of Xcode.
> 
> I wouldn't describe this as a limitation of Xcode. After all, the glass code is trying to access a 14.0 API using a 13.3 SDK. If the language was C++ the call wouldn't be in the headers and the code wouldn't compile.

In C++ we would need to use reflection (dlsym), so I can see your point.

> If we launch a jfx22 app on macOS 13 in theory we're sending NSApp an `activate` selector that it doesn't recognize. Or maybe it does? It's possible that this is an old internal call that Apple finally documented in 14.0. That would explain why they would be lenient about issuing a warning. I'll run some tests.

No, we're not. The `@available` generates a runtime check so that code is executed only if the runtime platform is macOS 14.x or later.

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

PR Comment: https://git.openjdk.org/jfx/pull/687#issuecomment-1924782232


More information about the openjfx-dev mailing list