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

Incomplete classpath causes infinite recursion in Resolve.isAccessible

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 11
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      Implementation

      Description

      Summary

      Change the implementation of javax.lang.model.type.ErrorType.getEnclosingType() to return an object with TypeKind.NONE, instead of an object with TypeKind.ERROR.

      Problem

      Currently, the javac's implementation of ErrorType.getEnclosingType() will return the type itself. This is causing problems even to javac as such, and seems unlikely to be useful to API users (as they might need to prevent a recursive walk through the enclosing types).

      Solution

      Return a type with TypeKind.NONE from javax.lang.model.type.ErrorType.getEnclosingType(), unconditionally.

      Specification

      javax.lang.model.type.ErrorType.getEnclosingType() unconditionally return a TypeMirror with TypeKind.NONE. No javadoc change.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jlahoda Jan Lahoda
              Reporter:
              cushon Liam Miller-Cushon
              Reviewed By:
              Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: