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

Supertype should never be null, and there should be no infinite supertype chains

XMLWordPrintable

    • generic
    • generic

      Currently there are cases where Types.supertype(Type) returns null.
      This should not happen. Callers should not have to test for null.

      Also, there should be no infinite supertype chains.
      Currently, Types.supertype(ErrorType t) returns t. Clients
      manipulating types via javax.lang.model.util.Types can too easily fall
      into a trap while walking the superclass chain up to the root. The
      expectation is that they'll eventually reach NoType. They shouldn't
      need to additionally check for ErrorType.

      The "See Also" field contains some examples of where these issues have
      caused problems. There have been others as well.

            jlahoda Jan Lahoda
            sseligmasunw Scott Seligman (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: