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

Qualified name of a type element depends on its origin (source vs class)

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P3 P3
    • 23
    • tools
    • None
    • behavioral
    • minimal
    • Existing implementation is inconsistent, so there is no compatibility risk to make it consistent according to the specification.
    • Java API
    • Implementation

      Summary

      Qualified name of a type element depends on its origin (source vs class).

      Problem

      javax.lang.model.type.TypeMirror::toString says: "Any names embedded in the result are qualified if possible." However the implementation is inconsistent in the form of an inner class name. It may return qualified name (for example java.lang.Runtime.Version) or flat name (for example java.lang.Runtime$Version).

      Solution

      Return always the qualified name.

      Specification

      There is no specification change, only implementation fix.

            asotona Adam Sotona
            jjg Jonathan Gibbons
            Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: