RFR: 8349848: Support lint control of sunapi diagnostics

Maurizio Cimadamore mcimadamore at openjdk.org
Mon Feb 17 10:11:10 UTC 2025


On Fri, 14 Feb 2025 21:07:36 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

> This PR creates a new lint category `proprietary` that controls the mandatory warning "Foo is internal proprietary API and may be removed in a future release".
> 
> This allows developers to suppress this warning using `-Xlint:-proprietary` and/or `@SuppressWarnings`.

Hi @archiecobbs, as @AlanBateman says, the use of critical internal API is discussed here: https://openjdk.org/jeps/260#Description
While these APIs are still available under the _jdk specific_ `jdk.unsupported` module, their use is generally discouraged, as in most cases safe/better alternatives are available. The (hacky) way to suppress these warnings is there -- but raising that at the level of a supported `lint` warning is something that I'm not comfortable with.

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

PR Comment: https://git.openjdk.org/jdk/pull/23650#issuecomment-2662632397


More information about the compiler-dev mailing list