Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8349846

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 25
    • 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.

            Unassigned Unassigned
            cushon Liam Miller-Cushon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: