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 jdk.vm.ci, the warnings are:
---
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/services/JVMCICompilerFactory.java:72: warning: [exports] interface JVMCICompiler in module jdk.vm.ci is not exported
public abstract JVMCICompiler createCompiler(JVMCIRuntime runtime);
^
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/services/JVMCICompilerFactory.java:72: warning: [exports] interface JVMCIRuntime in module jdk.vm.ci is not exported
public abstract JVMCICompiler createCompiler(JVMCIRuntime runtime);
^
error: warnings found and -Werror specified
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/services/HotSpotVMEventListener.java:70: warning: [exports] class HotSpotCodeCacheProvider in module jdk.vm.ci is not exported
public void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
^
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/services/HotSpotVMEventListener.java:70: warning: [exports] class InstalledCode in module jdk.vm.ci is not exported
public void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
^
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/services/HotSpotVMEventListener.java:70: warning: [exports] interface CompiledCode in module jdk.vm.ci is not exported
public void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
^
1 error
5 warnings
---
The lint will be disabled for jdk.vm.ci. Please check if the warnings can be fixed, or needs 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 jdk.vm.ci, the warnings are:
---
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/services/JVMCICompilerFactory.java:72: warning: [exports] interface JVMCICompiler in module jdk.vm.ci is not exported
public abstract JVMCICompiler createCompiler(JVMCIRuntime runtime);
^
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.runtime/src/jdk/vm/ci/runtime/services/JVMCICompilerFactory.java:72: warning: [exports] interface JVMCIRuntime in module jdk.vm.ci is not exported
public abstract JVMCICompiler createCompiler(JVMCIRuntime runtime);
^
error: warnings found and -Werror specified
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/services/HotSpotVMEventListener.java:70: warning: [exports] class HotSpotCodeCacheProvider in module jdk.vm.ci is not exported
public void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
^
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/services/HotSpotVMEventListener.java:70: warning: [exports] class InstalledCode in module jdk.vm.ci is not exported
public void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
^
.../jdk9/hotspot/src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/services/HotSpotVMEventListener.java:70: warning: [exports] interface CompiledCode in module jdk.vm.ci is not exported
public void notifyInstall(HotSpotCodeCacheProvider hotSpotCodeCacheProvider, InstalledCode installedCode, CompiledCode compiledCode) {
^
1 error
5 warnings
---
The lint will be disabled for jdk.vm.ci. Please check if the warnings can be fixed, or needs to be suppressed.
Thanks.
- relates to
-
JDK-8168317 [JVMCI] use reflection instead of jdk 9 Module API in Services.java
-
- Resolved
-
-
JDK-8153362 Add javac -Xlint warning to list exposed types which are not accessible
-
- Closed
-