[REDO] [REDO] 'internal proprietary API' diagnostics if --system is configured to an earlier JDK version

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 25
    • Component/s: tools
    • None

      Currently sunapi (compiler.warn.sun.proprietary) diagnostics are not emitted if --system is configured to an earlier JDK version, or if -XDignore.symbol.file is configured. Ideally sunapi diagnostics would be reported consistently in both of those configurations.

      See test coverage here: https://github.com/openjdk/jdk/blob/1ab1c1d53b86228be85aac96fa5d69db39ac6317/test/langtools/tools/javac/options/system/SystemSunProprietary.java#L94-L100

      There are some challenges to doing this, as discussed in JDK-8349058. sunapi are mandatory, unsuppressible warnings, so for compilations using -Werror introducing a sunapi warning that was not shown previously will break the build. Some of the remaining uses of APIs that result in warnings to not have easy migration paths (JDK-8349056). To work around this, -XDignore.symbol.file has become somewhat widely used as an ad-hoc suppression mechanism for sunapi diagnostics.

            Assignee:
            Unassigned
            Reporter:
            Liam Miller-Cushon
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: