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

[JVMCI] Exported elements referring to inaccessible types in jdk.vm.ci

XMLWordPrintable

    • b143

      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.

            dnsimon Douglas Simon
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: