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

Exported elements referring to inaccessible types in jdk.security.jgss

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: security-libs
    • Labels:

      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 jdk.security.jgss, the warnings are:
      ---
      .../jdk9/jdk/src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSContext.java:42: warning: [exports] class GSSContextImpl in module java.security.jgss may not be visible to all clients that require this module
          static class ExtendedGSSContextImpl extends GSSContextImpl
                                                      ^
      .../jdk9/jdk/src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSContext.java:45: warning: [exports] class GSSContextImpl in module java.security.jgss may not be visible to all clients that require this module
              public ExtendedGSSContextImpl(GSSContextImpl old) {
                                            ^
      error: warnings found and -Werror specified
      .../jdk9/jdk/src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java:38: warning: [exports] class GSSCredentialImpl in module java.security.jgss may not be visible to all clients that require this module
          static class ExtendedGSSCredentialImpl extends GSSCredentialImpl
                                                         ^
      .../jdk9/jdk/src/jdk.security.jgss/share/classes/com/sun/security/jgss/ExtendedGSSCredential.java:41: warning: [exports] class GSSCredentialImpl in module java.security.jgss may not be visible to all clients that require this module
              public ExtendedGSSCredentialImpl(GSSCredentialImpl old) {
                                               ^
      1 error
      4 warnings
      ---

      The lint will be disabled for jdk.security.jgss. Please check if the warnings can be fixed, or needs to be suppressed. Maybe the ExtendedGSSContextImpl and ExtendedGSSCredentialImpl classes are not intended to be public (they are implicitly public, as they are declared in an interface)?

      Thanks.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                weijun Weijun Wang
                Reporter:
                jlahoda Jan Lahoda
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: