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

4.7.9.1: Class type signatures vs binary names

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • 11
    • specification
    • vm

    Description

      (A correspondent writes:)

      I may have found a bug in JVMS 11, section 4.7.9.1.

      Page 130 of http://cr.openjdk.java.net/~iris/se/11/latestSpec/java-se-11-jvms-draft-diffs.pdf says:

      > A class type signature represents a (possibly parameterized) class or interface
      > type. A class type signature must be formulated such that it can be reliably
      > mapped to the binary name of the class it denotes by erasing any type arguments
      > and converting each . character to a $ character.

      An example of a class type signature is
        Lfoo/bar/Baz<Lp1.Quux;>.22;
      Doing the mapping described in JVMS yields
        Lfoo/bar/Baz$22;
      which is a field descriptor (JVMS §4.3.2), not a binary name (JLS §13.1).
      The corresponding binary name would be
        foo.bar.Baz$22
      and the internal form of the binary name would be
        foo/bar/Baz$22

      PS: Also a suggestion: on page 354 (twice), page 357 (once), and page 365 (once), change text like "the name is the binary name" to "the name is *the internal form of* the binary name", for clarity.

      Attachments

        Activity

          People

            dlsmith Dan Smith
            abuckley Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: