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

Exported elements referring to inaccessible types in java.desktop

    XMLWordPrintable

Details

    Description

      Under JDK-8153362:
      Add javac -Xlint warning to list exposed types which are not accessible

      A new lint for javac is developed that warns about exported elements that refer to types that are potentially inaccessible to the client of the API (like package private or not exported types).

      For java.desktop, these warnings are:
      ---
      .../jdk9/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java:333: warning: [exports] class DefaultAction in module java.desktop is not accessible to clients that require this module
          protected DefaultAction defaultPressAction;
                    ^
      .../jdk9/jdk/src/java.desktop/share/classes/javax/swing/JRootPane.java:344: warning: [exports] class DefaultAction in module java.desktop is not accessible to clients that require this module
          protected DefaultAction defaultReleaseAction;
                    ^
      error: warnings found and -Werror specified
      .../jdk9/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalBorders.java:742: warning: [exports] class MetalBumps in module java.desktop is not accessible to clients that require this module
              protected MetalBumps bumps = new MetalBumps( 10, 10,
                        ^
      .../jdk9/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalFileChooserUI.java:926: warning: [exports] class MetalFileChooserUI.DirectoryComboBoxRenderer in module java.desktop is not accessible to clients that require this module
          protected DirectoryComboBoxRenderer createDirectoryComboBoxRenderer(JFileChooser fc) {
                    ^
      .../jdk9/jdk/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalScrollBarUI.java:65: warning: [exports] class MetalBumps in module java.desktop is not accessible to clients that require this module
          protected MetalBumps bumps;
                    ^
      Note: Some input files use or override a deprecated API.
      Note: Recompile with -Xlint:deprecation for details.
      1 error
      5 warnings
      ---

      The lint will be disabled for java.desktop. Please check if these warnings can be fixed, or need to be suppressed.

      Thanks.

      Attachments

        Issue Links

          Activity

            People

              alexsch Alexandr Scherbatiy
              jlahoda Jan Lahoda
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: