-
Bug
-
Resolution: Fixed
-
P3
-
9
-
b144
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.
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.
- relates to
-
JDK-8169120 Private member used in javax/swing/plaf/metal/MetalBumps/Test6657026.java
-
- Closed
-
-
JDK-8153362 Add javac -Xlint warning to list exposed types which are not accessible
-
- Closed
-