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

Support lint control of sunapi diagnostics

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 9
    • tools
    • None
    • generic

      There used to be an internal flag '-XDenableSunApiLintControl' to enable using -Xlint to control them, but it was removed as part of a cleanup of 'unused options' in JDK-8148808.

      This enhancement proposes restoring the ability to control sunapi as a lint category, including with -Xlint: and @SuppressWarnings.

      Making sunapi mandatory and unsuppressible may have been a deliberate choice to encourage users to migrate off the deprecated APIs instead of suppressing. (I don't know the history of that decision or JDK-8148808, clarifications on that are welcome.) However in practice, due to bug JDK-8349846 sunapi diagnostics can be suppressed by passing -XDignore.symbol.file or some values of --system, so there is a suppression mechanism, it's just an ad-hoc one.

      Providing a way to suppress sunapi with -Xlint:-sunapi or @SuppressWarnings would provide a path to fixing JDK-8349846.

            acobbs Archie Cobbs
            cushon Liam Miller-Cushon
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: