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

Exported elements referring to inaccessible types in jdk.accessibility

XMLWordPrintable

      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.accessibility, the warnings are:
      ---
      .../jdk9/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AWTEventMonitor.java:219: warning: [exports] class AWTEventsListener in module jdk.accessibility is not accessible to clients that require this module
          static protected AWTEventsListener awtListener = new AWTEventsListener();
                           ^
      error: warnings found and -Werror specified
      .../jdk9/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/AccessibilityEventMonitor.java:66: warning: [exports] class AccessibilityEventListener in module jdk.accessibility is not accessible to clients that require this module
          static protected final AccessibilityEventListener accessibilityListener =
                                 ^
      .../jdk9/jdk/src/jdk.accessibility/share/classes/com/sun/java/accessibility/util/SwingEventMonitor.java:74: warning: [exports] class SwingEventListener in module jdk.accessibility is not accessible to clients that require this module
          static protected final SwingEventListener swingListener = new SwingEventListener();
                                 ^
      1 error
      3 warnings
      ---

      The lint will be disabled for jdk.accessibility. Please check if the warnings can be fixed, or needs to be suppressed.

      Thanks.

        There are no Sub-Tasks for this issue.

            prr Philip Race
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: