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

Wildcard initialization order produced confusing code

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      Because WildcardType.bound may not be initialized before a wildcard
      is used in a subtype question, the following code is used to determine
      the upper bound of super bounded wildcards:

        WildcardType w = (WildcardType)t;
        w.bound == null ? syms.objectType : w.bound.bound;

      This is unfortunate and should be addressed by rethinking how wildcards
      are set up.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ahe Peter Ahe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: